Oct 23

该插件可以让你通过 <!--page--> 注释标签来将一个长篇文章分页显示,效果见NirSoft Software Collection

之所以叫“虚拟分页”,是因为本插件只是通过Javascript+CSS来隐藏部分页内容,所以实际上文章内容在页面载入时是全部加载的。Virtual Pagination不能提高你的长篇文章载入速度,但是可以很好的控制文章的版面长度,至于切换页面,当然是实时的了。

插件的使用很简单,下载解压后把vpage目录上传到WordPress的Plugins目录下,在后台激活Virtual Pagination;在文章中通过<!--page--> 来进行分页。

注意:使用本插件用<!--page-->分页时,有分页文章的页面可能不能通过XHTML验证,原因是WordPress的wpautop生成了一些多余的未封闭的p标签。通常这并不影响显示效果。

如果您特别在意,目前解决的办法是,文章手工分段(或者使用内置的所见即所得编辑器),然后使用在分页文章的自定义字段添加:“killautop”(不包括引号),值为 1

Install Notes (English):

This plugin allows long post to be split across multiple Virtual Page,and switch pages realtime.

DEMO: NirSoft Software Collection

1. Download and extract it,then upload to your wordpress plugins directory.

2. Activate it in administrator’s interface.

3. Use:
< linenum="off">

or [!--page--]

tag to pagination the post.

4. If you care about XHTML ,you can add a custom field of 'killautop' set to '1' to this paged post to disable the auto formatting.