wordpress 版权信息

2010年6月28日 | 标签: ,

elegantbox 主题添加版权信息

在 function.php 中加入以下这段代码就行: 

function feed_copyright($content) {
        if(is_single() or is_feed()) {
                $content.= “<blockquote>”;
                $content.= ‘<div>  &raquo; 转载请注明来源:<a title=”蚂蚁弄潮” href=”http://www.mryin.com”>蚂蚁弄潮</a> &raquo; <a rel=”bookmark” title=”‘.get_the_title().’” href=”‘.get_permalink().’”>《’.get_the_title().’》</a></div>’;
                $content.= ‘<div> &raquo; 本文链接地址:<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 版权信息》
目前还没有任何评论.