How to implement pagination eg. newer – 3 – 4 – 5 – 6 – 7 – older

How can I implement pagination like shown in the title perhaps something similar to most sites

y2d08 1

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

I can across this awesome tutorial just the other day:

http://design.sparklette.net/teaches/how-to-add-wordpress-pagination-without-a-plugin/

which is a modified version of this one:

http://www.kriesi.at/archives/how-to-build-a-wordpress-post-pagination-without-plugin

Method 2

You can use WP-PageNavi
http://wordpress.org/extend/plugins/wp-pagenavi/

Method 3

I had the exact same problem. Here are 2 solutions, were the first needs some coding from your side and the second is “hit and run” plus is semantically correct: A list.

  1. paginate_link() function
  2. my “easy pagination deamon” plugin
    -> offers a template tag (you can change the name) like oxo_pagination( $range); that outputs the following:
    [first][previous][1][2][3][4][5][next][last]
    With the $range attribute you can tell how many page links you want to have (seen from current one) and you also got a small stylesheet that gives you the ability to target every part of the pagination plus the current one.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x