wordpress本身有很多功能都可以用小工具调用,那在设置时怎么去除wordpress功能自带的文章RSS、评论RSS、wordpress.org呢,有两种方法:
一、有的主题有自带的站点功能,在使用的时候可以自行去掉:
修改themes下的sidebar.php文件,找到如下代码:
<li><a href="<?php echo esc_url( __('http://wordpress.org/', 'ifeature' )); ?>" target="_blank" title="<?php esc_attr_e('Powered by WordPress, state-of-the-art semantic personal publishing platform.', 'ifeature'); ?>"></a><a href="<?php echo esc_url( __('http://wordpress.org/', 'ifeature' )); ?>" target="_blank" title="<?php esc_attr_e('Powered by WordPress, state-of-the-art semantic personal publishing platform.', 'ifeature'); ?>"><?php printf( __('WordPress', 'ifeature' )); ?></a></li>
每个主题自带的功能都不一样,有的有文章RSS有的没有,上面是提供seo的模板,可以根据自己的主题来定。
二、如果你使用小工具调用了wordpress本身的功能的话,可以修改wordpress本身的功能,找到安装在目录下的wp-includes文件下的default-widgets.php文件,找到对应代码如:
<?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
<li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php echo esc_attr(__('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 esc_attr(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.')); ?>">WordPress.org</a></li>
将对应代码替换掉或者删除掉即可。
另:在default-widgets.php这个文件里还可以找到以下的类,可以根据个人需要对WordPress自带的widgets进行修改等。
widget名称 widget类名 widget介绍
页面 WP_Widget_Pages 您博客的 WordPress 页面
日历 WP_Widget_Calendar 您博客的文章日程表
文章索引模板 WP_Widget_Archives 您博客文章的月度存档
链接 WP_Widget_Links 您的链接表
功能 WP_Widget_Meta 登入/登出,管理,Feed 和 WordPress 链接
搜索 WP_Widget_Search 您博客的搜索框
文本 WP_Widget_Text 任意文本或HTML
分类目录 WP_Widget_Categories 列表或是下拉菜单的分类目录
最近文章 WP_Widget_Recent_Posts 您博客的最近文章
最新评论 WP_Widget_Recent_Comments 最在侧边栏显示最新评论的列表
RSS WP_Widget_RSS 来自任何 RSS 或 Atom feed 的条目
标签云 WP_Widget_RSS 您最常使用的标签云
提供网站优化分享。