在主题文件 functions.php 中添加如下的代码:
//添加文章版权信息
function copyright($content) {
if(is_single()||is_feed()) {
$content.='<div class="open-message" style="border:#00a67c 1px solid;border-radius:5px 5px 5px 5px;"><i class="fa fa-bullhorn"></i>WEARM博客,版权所有丨如未注明,均为原创丨本网站采用<a href="https://www.xiariboke.com/*.html" rel="nofollow" target="_blank" title="BY-NC-SA授权协议">BY-NC-SA</a>协议进行授权,转载请注明转自:<a href="'.get_permalink().'" title="'.get_the_title().'">wearm.xin'.get_permalink().'</a></div>';
}
return $content;
}
add_filter ('the_content', 'copyright');
效果如下:

发表评论