让你的WordPress文章页显示【本文网址】

如果你的WordPress已经将网址设置成了“post-name.html” 类型,那么你完全可以让WordPress在文章页显示【本网网址】,有的模板可能已经集成了这个功能,如果没有的话要实现也非常简单,只要找到 single.php 页,在你想要现实的地方加入以下代码即可:

<?php _e(‘本文网址’); ?>:<a href=”<?php echo get_permalink() ?>” rel=”bookmark” title=”<?php the_title(); ?>”><?php echo get_permalink() ?></a>             

或者:

原文网址:<input name=”trackback_url” value=’<?php the_permalink()?>’ onfocus=”this.select()” onmouseover=”this.focus()” type=”text”>

我是用的第一种方法,第二种是网友提供的,功能应该是一样的, 还有一种现实【转载博客】的代码如下:

转载博客:<input name=”trackback_url” value=’<?php bloginfo(‘url’)?>’ onfocus=”this.select()” onmouseover=”this.focus()” type=”text”>

Popularity: 10% [?]

转发到新浪微博

3 Responses to “让你的WordPress文章页显示【本文网址】”

  1. Daily News About Wordpress : A few links about Wordpress - Monday, 11 May 2009 15:03 says:

    [...] 让你的WordPress文章页显示【本文网址】 [...]

  2. EwingANNMARIE says:

    It is well known that money makes people independent. But how to act when one does not have money? The one way is to try to get the personal loans and student loan.

  3. wing tattoo designs says:

    Very cool website, but you must improve your header graphics.

Leave a Reply

Spam Protection by WP-SpamFree