WP Page Numbers

2008-03-29 @ 18:44

Uppdaterad: 2010-01-07

Version 0.5 released. Mostly bug fixes.

I made a paging navigation plugin for WordPress that will be an alternative to the ”Next page” and ”Previous page”. Instead it uses numbers which makes it easier for users to choose what page to go to. It also makes a tighter internal link structure which makes it easier for search engines to find your posts.

Info and download

Themes to choose from

WP Page Numbers themes

All the 5 themes are included from start and are available in admin.

Screenshot

This is what it looks like if you don’t change anything (default paging theme):

Paging

You can also try it out as a live demo at the bottom of my blog.

Options

  • You can set all the texts and arrows to what ever you want
  • You can limit the number of pages shown at the time
  • You can create paging stylesheets themes (if you don’t want to overwrite the default theme)
  • You can turn off the stylesheet
  • You can turn off the page information (page 3 of 5)
  • You can turn off the page numbers
  • You can turn off the first and end page numbers
  • You can turn off the arrows

Updates 0.3 – 0.5

  • Fixed bug with page numbers disappearing
  • Added optional start and end code link wp_page_numbers($start, $end)
  • Changed get_blog_info(url) to get_blog_info(wpurl)
  • Changed get_settings (deprecated) to get_blog_info (bugfix)
  • Added missing echos, which should fix the URLs to the preview images in admin
  • Fixed 0 … 1 problem by checking if the page is front page or archive

Updates 0.2

  • Put some ”reset”-code into the themes stylesheet to make the navigation bar look correct in all themes
  • 5 WP Page Numbers themes to choose from
  • Some layout changes in admin

Install

  1. Upload the FOLDER ‘wp-page-numbers’ to the /wp-content/plugins/
  2. Activate the plugin ‘WP Page Numbers’ through the ‘Plugins’ menu in admin
  3. Go to ‘Options’ or ‘Settings’ and then ‘WP Page Numbers’ to change the options

Usage

  1. Replace the the ‘next_posts_link()’ and ‘previous_posts_link()’ with the code below in theme (archive.php, index.php or search.php). If you can’t find it, place it between endwhile; and endif; in your theme.
  2. <?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?>

Advanced usage

This plugin uses only WordPress own string values, no own SQL-querys is written. That means that you can use this plugin for more advanced use.

Example: You have a page which contains the query_posts() function and a loop to get some posts into the page. In that case you can use WP Page Numbers (see usage). If the posts are less than what is set in admin, the navigation will be hidden.

Contribution from users

Known issues

  • WP Page Numbers count wrong sometimes – Very high priority
  • Odd permalink structure makes the page numbers link wrong – High priority

Suggested features

These features could be included in future versions of WP Page Numbers.

  • Option to center the page numbers – Normal priority
  • Change the containing ID to an containing class to make the page validate with multiple page number sets – High priority
  • Localizable WP Page Numbers for different languages – High priority

Bug report

If you have found a bug I want to know about it so I can fix it.

  • Tell me your plugin version, WordPress version and what browser you use.
  • If you suspect a collision with another plugin, tell me what plugin you suspect, or a list with suspected plugins
  • Have you tested this plugin on another WordPress-version and can confirm that it works? Let me know!

Contribute

The best way to contribute is to spread the word, link to this page, blog about WP Page Numbers or give me feedback. All kinds of feedback are helpful to me. Suggestions and bug report are also welcome.

RSS-feed för kommentarer

404 svar till “WP Page Numbers”

  • Radzeen »
    2009-05-21 @ 3:50

    hi, i’m using your plugin.. thank you very much

  • Danny
    2009-05-26 @ 17:03

    Fhank you Jens, fhank you. I find your plugin very helpful especially for a newbie like me.
    I discovered other plugins you created and well impressed with them.

    Fhanks again.

    CHEERS :)

  • haily »
    2009-05-26 @ 19:27

    I use WP Page Numbers ver 0.2 and WordPress 2.7.1. On my screen display:
    Page 1 of 5
    >
    1
    2
    3
    4
    5
    instead of:
    Page 1 of 5 >12345

    Please solve problem !

  • Giro »
    2009-05-28 @ 21:55

    Thx, this a very easy way, creat plugin

  • Baju Bayi »
    2009-05-31 @ 9:44

    I have used this plugin and it worked.

  • Atul »
    2009-06-01 @ 14:53

    not working for me Page numbers are showing vertically instead of horizontal rest is fine Pls tell to rectify it

  • TCH »
    2009-06-01 @ 18:02

    Thanks for the plugins. The plugins is working great for me. Just need to ask for intergration with Manage user access plugins. Post is hide (MUA plugins) but your plugin still count posts and result in page navigation number that greater than post can be display. Does anyone know how to fix this

  • david »
    2009-06-07 @ 0:35

    tried it on my blog it would not display

  • Dirk »
    2009-06-08 @ 9:20

    Same problem as Atul, vertical oage numbers only with no css support (both frontend and backend).

  • Dirk »
    2009-06-08 @ 9:35

    Maybe I should specify my problem a bit:
    WP 2,7.1 in use. I
    Blog-URL and WordPress-URL are different!
    I noticed that page-numbers is running fine on another installation where Blog-URL and WordPress-URL are the same.

  • Mark »
    2009-06-10 @ 1:28

    Can anyone help me?

    Pagination works fine, but when i look at the comment page, a single page, I see this pagination: [1] … … [0]

    if($max_page != 1) >>> Works fine on pages that are single, but when comments are included the problem returns

  • Fakhruddin »
    2009-06-10 @ 15:21

    I Can’t Set / Configuare wp-pagenumbers in my Blog site, Please Help me, My E-Mail: fakhruddinalmahmud@gmail.com , Please Help Me Imediately. thanks

  • Louie Navarro »
    2009-06-11 @ 2:31

    how come the stylesheet doesn’t work. it just appear like this:

    http://friendstercourt.freetzi.com/wordpress/nostyle.jpg

  • Danny »
    2009-06-11 @ 14:45

    Hi Jens,

    Is there a way to add this plugin to a new page and not just on the home page?

    Many thanks in advance
    CHEERS :)

  • fl3x7
    2009-06-14 @ 20:42

    just wanted to leave a comment saying amazing plugin. Just enabled it and i think its definitly worth using! works perfectly.

    Looks great to. One thing that would make it even cooler though is if it used some kind of ajax to reload the new content area rather then a whole page refresh. This would make browsing through pages quicker and less server intensive :D. Other than that it is awesome.

    Keep up the great work mate :D

    • ben
      2009-07-19 @ 14:53

      Great plug-in, but i have a big problem with it:
      after the first page it dosen’t show images on the page
      (it seem’s as if the path is chaneg or something like that)

      can you tell me what do? thank’s!

  • Fropi
    2009-06-23 @ 9:36

    i just wanna say can you update the plugin with wp 2.8 it isnt working..

  • Simon
    2009-06-23 @ 11:21

    Great Plugin, Jens.

    One question… where can i change, that the number block is in the center of the page and not like now on my page on the right side?
    Thanks
    Simon

  • Kim Lemon »
    2009-06-30 @ 17:52

    I tried to autoinstall this plugin on WP2.8, but it says ”connection time out”… WTF? I need this plugin Jens, can you help me please?

  • Kevin
    2009-07-01 @ 10:56

    Using WP 2.8 the links do not work with permalink structure /%category%/%postname%/

  • help
    2009-07-02 @ 18:02

    not working wp 2.8 dude

  • Peter Marth »
    2009-07-04 @ 11:06

    I, need a Bugfix??

    Validation Output: 1 Error
    not allow element ”div” here; missing one of ”object”, ”applet”, ”map”, ”iframe”, ”button”, ”ins”, ”del” start-tag

    The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

  • Hell
    2009-07-05 @ 12:03

    not working after update !

    • jens
      2009-07-05 @ 13:55

      You get an error message? What does it say? For me it works.

  • José Luis »
    2009-07-05 @ 16:37

    Version 0.3 is not working in WordPress 2.8.

    • jens
      2009-07-05 @ 16:48

      Do you get an error? I tested it in WP2.8 and for me it works fine.

  • Stefan »
    2009-07-05 @ 16:56

    My page numbers look quite shitty right now: they are arranged from top to bottom instead from left to right and lost it’s style. I’m sorry but I have to deaktivate the plugin.

    • jens
      2009-07-05 @ 21:02

      Version 0.5 should hopefully solve the problems. Thanks for your help today.

      • Stefan »
        2009-07-05 @ 22:04

        Thanks, everything works fine again! Great job!

  • Abdelilah Nassib
    2009-07-06 @ 19:20

    Hallo Guys !! I Made a new WP Page Numbers theme!! check the demo here:www.baissi.com/blog
    & You can download It From This Link :http://rapidshare.com/files/252711400/Citrus.rar.html
    File Size:8Kb!!!

    • jens
      2009-07-09 @ 15:30

      Thanks! The theme is now available in the contribution section of the post. :)

  • Octav »
    2009-07-07 @ 3:55

    Looks like from certain pages, I get wordpress’s 404 error page. For example, take a look at the last page from http://www.octav.name/page/70

    • Octav »
      2009-07-07 @ 3:58

      Nevermind, I guess it was a problem from /wp-admin/options-reading.php
      ”Blog pages show at most” had value 10, but the ”Number of pages to show” setting was 7.

  • Vladimir »
    2009-07-09 @ 5:55

    Привет Автор плагина. Я очень благодарен за его создание. Я перевел ваш плагин на Русский язык. Теперь плагин можно перевести и на другие языки. Пользователи со всего мира я думаю это оценят. http://lukjanow.ru/2009/07/wp-page-numbers/

    • Nassib Abdelilah »
      2009-07-09 @ 11:55

      Хорошая работа человек!! Это большое преимущество! Проверить мои темы Вы любите его

  • Atul »
    2009-07-11 @ 17:09

    Not working for mine blog So installed WP- Page Navi

  • Andrew
    2009-07-13 @ 7:36

    Jens,

    The plug-in is great, but the new version did to our site what it did to Stefan’s: the page numbers are now a vertical list, rather than a horizontal one. We’re using WordPress 2.7 and can’t update just yet. Is there any way to get it back to horizontal?

    Thanks,
    A

  • flashadvanced »
    2009-07-13 @ 12:04

    Hello, Jens.
    I installed your plugin and at first I thought it doesn’t seem to work. I set the pages limit to 6 but nothing happened. Then I inserted severel posts more and when my blog had more than 10 posts I tested and everything worked great. So the thing that doesn’t work is the limit of the pages. I don’t know why.
    Could you please help. Thanks

  • mina
    2009-07-14 @ 18:56

    i test WP Page Numbers 0.5 isn’t work wordpress 2.8 and is not show number link

  • 30+ Must Have Wordpress Plugins | Best Wordpress | rooteto.com - Ertuğrul SAĞLAM »
    2009-07-19 @ 9:51

    […] Page Numbers http://www.jenst.se/2008/03/29/wp-page-numbers Adds pagination to your WordPress navigation, good for search […]

  • Anton »
    2009-07-19 @ 14:11

    Nice and easy :-)
    Thanks!

  • Top Wordpress Plugins 2009 | Business 2.0 Press »
    2009-07-19 @ 19:01

    […] Page Numbers http://www.jenst.se/2008/03/29/wp-page-numbers Adds pagination to your WordPress navigation, good for search […]

  • HYIP »
    2009-07-21 @ 13:01

    Look nice but it’s not work for me. I’m using WP Page Numbers with WP 2.8.1.

    I took a code like this

    Not Found
    Sorry, but you are looking for something that isn’t here.

    at index.php theme. The page number appeared but when i change the page , It shows a same result every pages.

    Thanks

  • Pranowo »
    2009-07-22 @ 7:33

    nice plugin i use wp 2.8.2

  • Plugins para Wordpress »
    2009-07-23 @ 0:49

    […] WP Page Numbers:  Versión más liviana y efectiva que el PageNavi. Para los que no lo conocen, agrega un barra con números de páginas más atractiva que el tradicional enlace de siguiente y anterior. […]

  • Promo-Akciya »
    2009-07-23 @ 8:39

    Спасибо! – этот плагин установлен на всех моих блогах.. Кто нибудь ответьте пожалуйста – можно ли сделать прозрачным?

  • Promo-Akciya »
    2009-07-23 @ 8:40

    Thank you! – Excellent work! This plugin is installed on all my blogs .. Who someone please answer – is it possible to make transparent?

  • » Inserire numero di pagine in wordpress | Online Tutorial »
    2009-07-25 @ 10:36

    […] Prima di tutto bisogna scaricare il plugin necessario. Il nostro consiglio : WP Page Numbers […]

  • rami »
    2009-07-29 @ 17:11

    New idea for the next version :

    Thems with images for the numbers (one.gif, two.gif …) and the next/prev (next.gif, prev.gif).

    This new improvement can increase the plugin usage and increase theme developers desire to design new graphical themes.

  • Nomex
    2009-08-04 @ 10:15

    Does this plugin also works for the distribution of comments?

  • Steve
    2009-08-04 @ 18:52

    Great plug-in. Works perfectly, but wanted to know if it is possible to display page numbers at both bottom and top of blog?

  • Hummy »
    2009-08-06 @ 21:15

    How would I go about changing the Next and Previous Icons to an Image?

  • Hummy »
    2009-08-06 @ 21:49

    I’ve managed to figure out how to add images myself however how do I target these images in the CSS, I don’t want a border around them?

  • Michael
    2009-08-07 @ 7:37

    using yr ver 0.5 with WPMU 2.8.2. Activated it (for site-wide usage) and its perfect. But once you click deactivate, the message will say Successfully Deactivated, but the plugin Page Numbers is still showing the link as Deactivated link (meaning it wasn’t deactivated).

  • Great Work
    2009-08-09 @ 12:09

    Great work! Thank You!

  • Leslie »
    2009-08-12 @ 23:48

    Hi Jens,
    Is it possible to get WP Page Numbers to work with qtranslate?
    eg: http://www.site/lang/page/2
    when dealing with 10 languages the lang needs to be inserted except for the default lang.
    Or where can I insert <a href="

    • iphoneroot »
      2009-08-20 @ 13:56

      I made it work with qtranslate. All you need to do is to modify wp-page-numbers/wp-page-numbers.php:
      Surround call to get_pagenum_link(…) with qtrans_convertURL().
      For example we had:
      $pagingString = ‘‘.$prevpage.’‘;
      updated:
      $pagingString = ‘‘.$prevpage.’‘;

      • jens
        2009-08-21 @ 17:38

        That sounds good. qTranslate is a well known plugin. I’m currently working on a totally rewritten paging plugin. It’s going to be great I think. I might include the code into the new one later one, if it works.

        Thank you so much!

      • Leslie »
        2009-08-29 @ 16:24

        Thanks iphoneroot for the Qtranslate advice, works perfectly

      • Jirka »
        2011-04-23 @ 23:30

        Hi, firstly THANK YOU so much for great plugin and secondly thanks iphoneroot for qtranslate customization!!

  • Matthias Pospiech »
    2009-08-14 @ 23:35

    The plugin does not display on static pages. Is this feature disabled for a special reason? For me it means that I can not use the plugin.

  • Татарстан »
    2009-08-22 @ 5:40

    cool!!!!!!!!!!!!!!