wordpress 版权信息
elegantbox 主题添加版权信息
在 function.php 中加入以下这段代码就行:
function feed_copyright($content) {
if(is_single() or is_feed()) {
$content.= “<blockquote>”;
$content.= ‘<div> » 转载请注明来源:<a title=”蚂蚁弄潮” href=”http://www.mryin.com”>蚂蚁弄潮</a> » <a rel=”bookmark” title=”‘.get_the_title().’” href=”‘.get_permalink().’”>《’.get_the_title().’》</a></div>’;
$content.= ‘<div> » 本文链接地址:<a rel=”bookmark” title=”‘.get_the_title().’” href=”‘.get_permalink().’”>’.get_permalink().’</a></div>’;
$content.= “</blockquote>”;
}
return $content;
}
add_filter (‘the_content’, ‘feed_copyright’);
if(is_single() or is_feed()) {
$content.= “<blockquote>”;
$content.= ‘<div> » 转载请注明来源:<a title=”蚂蚁弄潮” href=”http://www.mryin.com”>蚂蚁弄潮</a> » <a rel=”bookmark” title=”‘.get_the_title().’” href=”‘.get_permalink().’”>《’.get_the_title().’》</a></div>’;
$content.= ‘<div> » 本文链接地址:<a rel=”bookmark” title=”‘.get_the_title().’” href=”‘.get_permalink().’”>’.get_permalink().’</a></div>’;
$content.= “</blockquote>”;
}
return $content;
}
add_filter (‘the_content’, ‘feed_copyright’);
» 转载请注明来源:蚂蚁弄潮 » 《wordpress 版权信息》
发表评论
| Trackback
