Set automatic paging for WordPress article content pages

Source: Internet
Author: User
& Lt ;! -- Nextpage -- & gt;, which is a built-in tab of wp. However, this tag must be supported by the template. That is to say, the page should contain: & nbsp; & lt ;? Phpwp_link_pages ();? & Gt; otherwise, even if you add the nextpage tag during editing, the article will not be automatically paged. 1. first, confirm This is the built-in tab of wp.
However, this tag must be supported by the template.
That is to say, the page should contain :?
Otherwise, even if you add the nextpage tag during editing, the article will not be automatically paged.

1. First, we need to confirm whether the template used supports the article paging feature. Open your template folder. a total of two files need to be modified (or possibly one), which are index. php (homepage article list) and single. php (article content page, if any ).

Open these two files and find the line of the function shown in the article. it may be in the following two formats or similar formats:

 
 

If it does not contain the following content (paging is supported), add it:

 

Save and exit. The paging effect of the default function is similar to Page: 1 2 3. if you need more display styles, see the following content or use div decoration:

Http://codex.wordpress.org/Template_Tags/wp_link_pages

2. add a paging tag in the article.

Open the article to be edited, select the HTML source code mode, and add the following tag to the page:

Note that each tag indicates a page and the nextpage tag is truncated by more.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.