WordPress长文章分页

触手所及 | March 12, 2007

来自Andy’s Blog

Wordpress本身就有文章的分页功能,非常好用,免去了使用插件的麻烦。

方法:
1、在文章中需要分页的地方加入

<!–nextpage–>

标记。
2、检查当前所使用的模版文件single.php中是否调用了函数link_pages()在WP的默认模版中是有这个函数调用的,但是有些模版没有。如果没有,你就需要在该文件的

<?php the_content(); ?>

之后增加如下的代码这样就行了。

<?php link_pages(’<p><strong>分页:</strong> ‘, ‘</p>’, ‘number’); ?>


J for J的個人生活, 始于公元2001. | Permalink
……更多文章,在 触手所及中找啦 | del.~ | Tech~
……或者查看標簽: .


嘿嘿……

JunePoetry

『静极--谁的叹嘘?

密西西比河此刻风雨,在那边攀援而走。
地球这壁,一人无语独坐。』

-- 昌耀《斯人》

令人感动的诗歌,继续阅读J推荐的诗歌»

Leave a Reply

垃圾留言渐增,烦请留下姓名和email(支持Gravatar头像)。

  • :em01:
  • :em02:
  • :em03:
  • :em04:
  • :em05:
  • :em06:
  • :em07:
  • :em08:
  • :em09:
  • :em10:
  • :em11:
  • :em12:
  • :em13:
  • :em14:
  • :em15:
  • :em16:
  • :em17:
  • :em18:
  • :em19:
  • :em20:
  • :em21:
  • :em22:

CC.All trademarks and copyrights on this page are owned by their respective owners. Comments are owned by the Poster.
The rest copyright © 2001 - 2008 J's Life, powered by WP. Theme: night or light. Entries RSS.