在wordpress的widgets(侧边栏)中的Meta(有的中文版翻译为“功能”)下面,默认会有几个链接,有些中文用户因为已经烧制了feedsky或feedburner feed,可能会想精简这几项,但又希望留下“登录”、“注册”等常用功能,那应该如何做呢?
涌泉刚刚解决了这个问题,想记下来以备自己和需要的wordpress用户参考。
并不复杂,进入/wp-includes文件夹,打开widgets.php,搜索“meta”,可以找到下面这个函数:
function wp_widget_meta($args) {
extract($args);
$options = get_option('widget_meta');
$title = empty($options['title']) ? __('Meta') : $options['title'];
?>
<?php echo $before_widget; ?>
<?php echo $before_title . $title . $after_title; ?>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php echo attribute_escape(__('Syndicate this site using RSS 2.0')); ?>"><?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
<li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php echo attribute_escape(__('The latest comments to all posts in RSS')); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
<li><a href="http://wordpress.org/" title="<?php echo attribute_escape(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.')); ?>">WordPress.org</a></li>
<?php wp_meta(); ?>
</ul>
<?php echo $after_widget; ?>
<?php
}
extract($args);
$options = get_option('widget_meta');
$title = empty($options['title']) ? __('Meta') : $options['title'];
?>
<?php echo $before_widget; ?>
<?php echo $before_title . $title . $after_title; ?>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php echo attribute_escape(__('Syndicate this site using RSS 2.0')); ?>"><?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
<li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php echo attribute_escape(__('The latest comments to all posts in RSS')); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
<li><a href="http://wordpress.org/" title="<?php echo attribute_escape(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.')); ?>">WordPress.org</a></li>
<?php wp_meta(); ?>
</ul>
<?php echo $after_widget; ?>
<?php
}
其中
<li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php echo attribute_escape(__('Syndicate this site using RSS 2.0')); ?>"><?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
<li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php echo attribute_escape(__('The latest comments to all posts in RSS')); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
<li><a href="http://wordpress.org/" title="<?php echo attribute_escape(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.')); ?>">WordPress.org</a></li>
<li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php echo attribute_escape(__('The latest comments to all posts in RSS')); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
<li><a href="http://wordpress.org/" title="<?php echo attribute_escape(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.')); ?>">WordPress.org</a></li>
可能是你不需要的,在头尾加上/* */注释掉即可。也可以删除它,但如果你以后要恢复会麻烦些,还是建议注释掉。然后上传覆盖掉原文件即可。为安全起见,修改前请备份!
标签: wordpress模板
我只保留了
目前正忙着新主题,杂志新闻型风格的。
[Reply]
学习
moon最近在博客发布的文章为:新的旅程…
[Reply]