Sometimes Posts or Pages in pages in wordpress can get lengthy, which might bore the reader or can make the design look odd with its old length.Here’s how you can split you posts or pages into multiple pages using a simple shortcode in you post or page.
How To :
- Decide where in the page / post you want to the split and place this short code
“<!—nextpage—>” [without quotes] and remember to insert this in the HTML editor.
- Now check if your theme supports pagination within posts and pages by looking for this piece of code in your single.php and page.php [ or a similar file according to the theme your using.]
“<?php wp_link_pages(‘<p><strong>Pages:</strong> ‘, ‘</p>’, ‘number’); ?>” [without quotes].
Incase you don’t find it in your theme, do insert it else you will not be able to see the page numbers of the post/page that it has been split into.Insert this code somewhere after or before the “the_content()” function.
- Note that the url will look something like this“http://www.xyz.com/post-title/1/” — For Page 1
http://www.xyz.com/post-title/2/” — For page 2 - Now to the SEO part, you could use the canonical tag to eliminate the risk of duplicate content.
awesome! Didn’t know this was built into the core. Nice post.
Thanks for this tip. I always wondered how it’s done. Now I know. Would you happen to know if this works withe WP-Pagenavi plugin?
@Charlie : Yes it works along side wp-page navi plugin.
Great tip… If only it worked right in my theme. It seems that when the second page is populated with text, it doesn’t carry the formatting to the second page (ie:blockquote) Does anyone know the fix for this?
Awesome! Thank you for helping me to get this to work!
Thanks! for the great tip.
But there is one issue. When I click on the second page then It only shows the template images.