Useful Hack: Post Pagination

I had a bad headache on one of my client site.

They manage professional surf competitions and a lot of those events are multi days events. So they often updating their site every day on certain event and since the post in WordPress is chronological, their homepage was full of same events. Somehow, they’ll need to have one post for the whole event report but not taking all the spaces in their homepage for 1st, 2nd etc day report of the event.

My solution was to Google it and found this post at WP’s publisher blog.

To make post pagination is by simply inserting this line of codes in index.php or single.php:

<?php wp_link_pages(); ?>

Then add this tag on wherever you need to cut the pos (HTML mode in Post Editor)t:

<!–nextpage–>

Then i was done. You can also style and customize the pagination links by seeing some examples at WordPress Codex here.

The result is going to be something like this (click on page numbers below).

Author: Robin

Jack of all trades living in SF Bay Area, California. Asian.

0 thoughts on “Useful Hack: Post Pagination”

Leave a Reply

Your email address will not be published. Required fields are marked *