HTML中通过来指定博客feed,可以被浏览器检测到,然后被读者订阅。
如果你不想添加feed,或者想使用烧制的feed(如FeedSky或者Feedburner烧制的feed),可以移除之。
1 2 |
remove_action( ‘wp_head’, ‘feed_links’, 2 );//文章和评论feed remove_action( ‘wp_head’, ‘feed_links_extra’, 3 ); //分类等feed |
注意,这里只是隐藏,并不是代表这个链接不能访问了,直接访问还是可以访问的。
我们注意到,这一段function会将以上两句feed全部删除,如何只删除comments/feed,留下/feed?没找到。
1 |
remove_action( ‘wp_head’, ‘feed_links’, 2 );//文章和评论feed |
于是就只能在function.php中加入以上code,在header.php中另外加入
1 |
<link rel="alternate" type="application/rss+xml" title="<?php wp_title();?> » Feed" href="<?php bloginfo('rss2_url'); ?>" /> |
如果有解决方法的,欢迎评论。