function feed_copyright($content) { if(is_single() or is_feed()) { $content.= ' 转载请注明来源:'.get_the_title().' '; $content.= ' 本文链接地址:'.get_permalink().' '; $content.= ' 订阅本站:http://www.moke8.com/f/?t=dy '; $content.= ""; } return $content;}add_filter ('the_content', 'feed_copyright');
将以上代码加入到functions.php即可在每篇文章的末尾输出一个转载和版权提示,本站的文章尾部广告就是这样添加的,效果图:
