wordpress设置版权信息

在主题根目录的functions.php中,增添以下代码(将版权信息改成你自己的)即可:

1

2

3

4

5

6

7

8

9

10

11

12

13

/* RSS 中添加版权信息 @44ux.com */

function feed_copyright($content) {

     if(is_single() or is_feed()) {

          $content.= "<p class='copyright'>";

          $content.= '版权所有:<a title="Hi.laser! @44ux.com" href="http://www.44ux.com/">Hi,laser! @44ux.com</a> <a rel="bookmark" title="'.get_the_title().'" href="'.get_permalink().'">《'.get_the_title().'》</a><br />';

          $content.= '本文链接:<a rel="bookmark" title="'.get_the_title().'" href="'.get_permalink().'">'.get_permalink().'</a><br />';

          $content.= '特别声明:除特别标注,本站文章均为原创,遵循<a href="http://creativecommons.org/licenses/by-nc/3.0/deed.zh_HK" target="_blank">CC BY-NC 3.0</a>,转载请注明出处';

          $content.= "</p><br />";

     }

     return $content;

}

//add_filter ('the_content', 'feed_copyright'); //此句可像文章内容中添加版权

add_filter ('the_excerpt_rss', 'feed_copyright');

猜你喜欢

转载自blog.csdn.net/THMAIL/article/details/105932119
今日推荐