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

242 svar till “WP Page Numbers”

  • WordPress Plugins »
    2010-02-22 @ 23:27

    You have some great plugins on your post. Your insight and expertise would be a welcome addition to our new community, i hope you will consider joining, and thanks for sharing!

    Svara
  • wordpress必备插件整理 - 水妖视界 »
    2010-02-26 @ 7:44

    [...] 评论插件,比系统自带的强多了,示例见本部右侧最新评论。  WP Page Numbers [...]

    Svara
  • RLam »
    2010-02-28 @ 8:15

    Your plugin works great for me. Thanks for your contribution.

    Svara
  • WP Pages WordPress Plugin | Web Considerations »
    2010-03-01 @ 17:40

    [...] plugin for navigation pages (instead of the Next and Previous is called WP Page Numbers authored by Jens Tornell and can be downloaded from his [...]

    Svara
  • Rizwan »
    2010-03-01 @ 22:40

    Is there a way to specify paging for posts in a specific category instead of all posts?

    Svara
  • KarachiCorner Blog »
    2010-03-02 @ 16:49

    its really helpful.. now i can implement page Numbers plug in very easily to my WP. blog
    thanx

    Svara
  • 爆笑笑话 »
    2010-03-05 @ 8:54

    Thanks Danny it work like a charm

    Svara
  • Samuel Allen
    2010-03-07 @ 0:59

    Do you by chance have a patch or workaround for the page count errors?

    Svara
  • Thomas »
    2010-03-10 @ 19:31

    Using WP Page Numbers on a multilingual website (with qTranslate) it would be fine to create a localized version of WP Page Numbers. We can contribute the german localization.

    Svara
  • Thomas »
    2010-03-10 @ 19:40

    The localization works with qTranslate, just use the fields of Settings-Text like this:
    Pagina Seite

    Svara
  • michael »
    2009-05-11 @ 0:01

    Do i replace

    next_posts_link(__(‘« Older Entries’, ‘default’)) with

    then, also replace

    previous_posts_link(__(‘Newer Entries »’, ‘default’)) with
    ..

    or am i doing something wrong?

    Svara
  • Danny
    2009-05-26 @ 17:15

    Replace this code in archive.php, index.php or search.php

    With this code

    It worked for me but maybe someone else has a different way.
    CHEERS :)

    Svara

Lämna en kommentar