代码之家  ›  专栏  ›  技术社区  ›  NotSimon

WordPress怎么样!--nextpage-->标签真的有效吗?

  •  1
  • NotSimon  · 技术社区  · 16 年前

    <?php wp_link_pages( $args ); ?> 
    

    2 回复  |  直到 10 年前
        1
  •  2
  •   Michael    16 年前

    explode 函数将内容拆分为“页面”数组。发生在 setup_postdata 使用此代码执行函数:

    $pages = explode('<!--nextpage-->', $content);

        2
  •  0
  •   Stay-at-home-dad    16 年前

    http://www.digimantra.com/tutorials/wordpress/multipaging-a-single-post-using-wp_link_pages/

    Wordpress有一个名为wp_link_pages()的模板标签,负责帖子的分页。所以你必须把这个放在_content()标签后面。与所有其他wordpress标签一样,它也有一些参数,可以帮助您以非常简单的方式自定义功能。以下是wordpress文档中定义的参数。

    before (string) Text to put before all the links. Defaults to <p>Pages:
    
    after (string) Text to put after all the links. Defaults to </p>.
    
    link_before (string) Text that goes before the text of the link.
    
    link_after (string) Text that goes after the text of the link.
    
    next_or_number (string) Indicates whether page numbers should be used. Valid values are:
    * number (Default)
    * next (Valid in WordPress 1.5 or after)
    
    nextpagelink (string) Text for link to next page. Defaults to Next page.
    
    previouspagelink (string) Text for link to previous page. Defaults to Previous page.
    
    pagelink (string) Format string for page numbers.  % in the string will be replaced with the number, so Page % would generate “Page 1″, “Page 2″, etc. Defaults to %.
    
    more_file (string) Page the links should point to. Defaults to the current page.