Paginated Content
How can pagination help you?
- If you write a long post, you can paginate it so users won’t have to scroll so much.
- If you write a page with a lot of content, you can also paginate it for the same reason. Instead of making another page and linking it. Saves time and effort. That way, you can edit all of that content in one page. Instead of having to make similar changes in more than one page.
- Plently other reasons.
How can I do it?
Easy! Whenever you want one page to end and the next to start insert the following piece of code: <!--nextpage--> . Continue typing under it the content that will start on page number two.
Customize the look:
By default it will probably look boring. Something like this: Pages: Page 1 Page 2.
How can you customize that? Easy! Look in your template files (page.php) or if your using pagination on posts (single.php/single_post.php/post.php/etc) and see if find something similar to this: <?php the_content('Read More '); ?> . Right below it, insert the following code:
<div class="pageslink"><?php wp_link_pages('pagelink=%'); ?></div>
To make it “pretty” add the following CSS. This is mine, edit yours how you please.
.pageslink a, .pageslink a:link, {padding: 1px 6px 1px 6px;
margin: 2px; border: 1px solid #cecece;color: #000; text-decoration: none; text-transform: none;}
.pageslink a:visited{color: #000;}
.pageslink a:hover {border: 1px solid #000;color: #cecece;}
If you have any questions at all be free to contact me to let me know!
Example:
This ends page numer 1.