I have a wordpress theme displaying the Next / Previous post but having some trouble when you’re viewing the first post.
Obviously on the first post there are no other posts previous, however I would like to display the next post 2 posts
My current code looks like:
<?php next_post('%','', TRUE, '1'); ?>
<?php previous_post('%','', TRUE, '1'); ?>
I usually get the current page and then apply a class to that page, I don’t know if you can do this in wordpress.
also check this
php pagination
script on github php paginatorLet’me try. You can check the position on the loop, to check if it is on beginning or in the end.
You can change something to get it better.