没有所谓的捷径
一切都是时间最平凡的累积

wordpress文章页面末尾添加版权信息,或者追加内容

本文最后更新:2023年6月10日,已超过322天未更新,如果文章内容失效,请留言反馈本站。

善意的转载者既使没有看到版权信息也会主动自觉地添加上原文出处,但是大部分站长都是直接采集的,如果我们在网站文章的尾部添加一个版权信息,大部分站长采集后也不回去特意把每篇采集来的文章都去除版权,所以为文章添加一个版权信息和转载提示还是非常有必要的。本文实例讲述了WordPress文章底部去除与添加版权信息的方法。分享给大家供大家参考。具体分析如下:

这里参考一些网友的版权声明信息,具体更改方法为:

外观>>编辑“single.php”文件,找到类似“div class="content"”的源码,在下面相应位置添加.

方法1

<p>本文链接: <a href="<?php%20the_permalink()%20?>" rel="bookmark" title="<?php the_title(); ?>"> 
<?php%20the_permalink();%20?></a><br/>转载请注明转载自:<a href="">SeaRu</a></p>

方法2

本文链接:<a rel="bookmark" title="<?php the_title(); ?>" href="<?php%20the_permalink();%20?>"><?php echo wp_get_shortlink(); ?></a> 
订阅豫章小站:<a title="SeaRu" href="" rel="external nofollow">http://feed. searu.org</a></div> <br/> 
转载请注明来源:<a title="SeaRu" href="" rel="external nofollow">SeaRu</a> <a rel="bookmark" title="<?php the_title(); ?>" href="<?php%20the_permalink();%20?>">《<?php the_title(); ?>》</a>
<pre lang="php" line="0" escaped="true" >

方法3

本文由<?php the_author_posts_link(); ?>,转载请注明转自:<?php bloginfo('name'); ?><a href="<?php%20echo%20get_settings('home');%20?>"><?php%20echo%20get_settings('home');%20?></a>;
如果你觉得本博内容不错,欢迎 <a href= target="_blank">订阅豫章小站</a>,以便第一时间了解豫章小站更新内容;
本文链接:<a href="<?php%20the_permalink()%20?>" title="<?php the_title(); ?>"><?php%20the_permalink();%20?></a>

方法4

将以下代码加入到functinos.php即可在每篇文章的末尾输出一个转载和版权提示,

function feed_copyright($content) {if(is_single() or is_feed()) {
$content.= '<div>转载请注明来源:<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.= '<div>订阅本站:<a title="wordpress建站" href="http://www.v7v3.com/f/?t=dy">http://www.v7v3.com/f/?t=dy</a></div>';
$content.= "</blockquote>";}return $content;
}
add_filter ('the_content', 'feed_copyright');

将以上代码加入到 functinos.php即可在每篇文章的末尾输出一个转载和版权提示,当然你可以利用这种方法在文章尾部添加广告。

» 站长码字辛苦,有用点个赞吧,也可以打个
» 若转载请保留本文转自:豫章小站 » 《wordpress文章页面末尾添加版权信息,或者追加内容》
» 本文链接地址:https://blog.mydns.vip/4717.html
» 如果喜欢可以: 点此订阅本站 有需要帮助,可以联系小站
赞(0) 打赏
声明:本站发布的内容(图片、视频和文字)以原创、转载和分享网络内容为主,若涉及侵权请及时告知,将会在第一时间删除,联系邮箱:contact@mydns.vip。文章观点不代表本站立场。本站原创内容未经允许不得转载,或转载时需注明出处:豫章小站 » wordpress文章页面末尾添加版权信息,或者追加内容
分享到: 更多 (0)

评论 抢沙发


  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

智慧源于勤奋,伟大出自平凡

没有所谓的捷径,一切都是时间最平凡的累积,今天所做的努力都是在为明天积蓄力量

联系我们赞助我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏