在WordPress文章中添加本文链接和版权申明代码

本文链接: http://sancc.us/wordpress/posts/4820

如何在WordPress的文章中加上自己的文章链接和版权申明的链接呢?

1、在你的WordPress主题模板里面找到文章模板(single.php)这个文件

2、找到这个代码:<?php the_content(); ?>

3、在这个代码前面加上:

<p>本文链接: <a href=”<?php the_permalink() ?>” title=”<?php the_title(); ?>”><?php the_permalink(); ?></a></p>

ps:如果你还需要对这个代码进行其他的修饰:如居中或者文字的字体和颜色之类的,可以再加上自己的需要的属性代码:

比如你需要在WordPress文章结尾加上居中显示的本文链接和版权申明文字的链接的话,可以这样:

<p style=’text-align: center;’>本文链接: <a href=”<?php the_permalink() ?>” title=”<?php the_title(); ?>”><?php the_permalink(); ?></a></p>

其他的话你可以自己考虑!!这里只说明添加一个属性的设置!

热门文章

Both comments and pings are currently closed.

One Response to “Chrome OS 平板电脑将威胁iPad的十大理由”

  1. [...] More:  Chrome OS 平板电脑将威胁iPad的十大理由« 沙浪网 [...]


Search, Register and Transfer Web Domain Names and More - GoGoDNS.COM | Domain Names | Web Hosting | SSL Certificates | Email Accounts | Marketing Tools | Build a Website | Reseller Plans