WordPress Post Pagination
March 27th, 2009 by Oliver - Tagged with WordPress - Posted in Other Stuff
Are your posts getting too long? Taking a while to load in? Looking to write a step by step tutorial? For whatever reason you want to split your posts into pages heres the answer …
To break a single post into pages insert the tag below into the HTML view of your post:
Each time you insert the code above into your post the content underneath will be put onto a new page.
Below I have added two screenshots, that show where top put tags in and what they look like:
Visual View

HTML View

The shot above shows the actual code that I have used to split the first and second pages of this post, again it is critical to do this in HTML view.
Example of the code (in the HTML view of your post) to create a 3 page post:
<!–nextpage–>
This is page two of an example post.
<!–nextpage–>
This is page three of an example post.
If your running a custom theme that you have written make sure the your theme has this WP tag somewhere after the post content otherwise the links to the various post pages won’t appear!
As with most WP functions wp_link_pages() has plenty of arguments, full list here.
Wasn’t that hard was it!?
What does it look like? I’ve demonstrated on this post …








Comments (5)
I can’t get this to work no matter what I try. I’ve added the code above to my single.php file, my index.php file and page.php file and no matter what I can’t get my posts to paginate. Any help is appreciated. If I add the page it will cut off the content but not show anything.
Second on Devin.
I tried everything, even switching themes.
Yes, the wp_link_pages call is in there, and yes, I placed in my post.
Did you copy and paste it into the normal view or HTML view? If you paste it within the normal view the text editor will change the special chars. to markup?
Yep. I get an error Parse error: syntax error, unexpected ‘>’ when I try this.
I’ve added screenshots to try and clear this matter up a bit more.
@Daniel – Are you definitely adding the < !–nextpage–> tag in HTML view? When you have added it do you get the ‘visual’ versions of the tags as shown above when your in ‘visual view’?