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”

  • Michel »
    2012-02-21 @ 12:53

    Hello,
    I’m French and I don’t speak english very well.
    I want to install another version of the plugin and so I want change the file ”wp-page-numbers.php” to install a second version of the plugin (I want a second configuration for my blog).
    I have changed the name in first line ”WP Page Numbers 2” and I have changed the name of the functions with ”_2” but it’s not good, there are errors and wordpress don’t accept to activate it.
    Can you help me, me please ?
    Best regards !

  • Fabio
    2012-02-23 @ 15:23

    We have problem with this query.

    SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts WHERE 1=1 AND ( wp_posts.ID NOT IN (
    SELECT object_id
    FROM wp_term_relationships
    WHERE term_taxonomy_id IN (17451,19842,21673,23060)
    ) ) AND wp_posts.post_type = ‘post’ AND (wp_posts.post_status =
    ‘publish’) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 20

    And we need to understand if this coming from your plugin.
    We have a lot of posts so the pagination burn our CPUs.
    Thanks for all helps

  • The Guide To Useful WP WordPress Plugins - B 6 G NET »
    2012-02-29 @ 21:28

    […] something worked, so most of them will fix little things like character replacement and what not. WP Page Numbers – Show pages numbers instead of "Next page" and "Previous Page". WPMS Sidebar […]

  • Komunitas Blogger Malang (Ngalam) » 5 Perbaikan untuk Blog anda »
    2012-03-19 @ 7:51

    […] Script apa yang digunakan? ngapain coding susah – susah kalo udah ada pluginnya ? Download aja disini WP Page Number […]

  • ibgiu| 吾爱亦乐橙 »
    2012-03-31 @ 16:35

    […] page numbers的英文搜索结果 – 来自 WP Page Numbers – WordPress plugin for navigation paging… I made a paging navigation plugin for WordPress that will be an alternative to the ”Next page” […]

  • Bizimle gelecek daha güvenli | Online iş platformu »
    2012-03-31 @ 19:11

    […] I’ve rewritten it further, and now decided to release my version as it’s own plugin, given that I haven’t heard back from the original author. […]

  • The Guide To Useful WP Plugins »
    2012-04-09 @ 14:58

    […] Guide To Useful WP Plugins WP Page Numbers – Show pages numbers instead of "Next page" and "Previous Page". WPMS Sidebar […]

  • The Guide To Useful WP WordPress Plugins | B 6 G . net »
    2012-04-18 @ 15:47

    […] something worked, so most of them will fix little things like character replacement and what not. WP Page Numbers – Show pages numbers instead of “Next page” and “Previous […]

  • Wordpress bilogunuz » Wp Page Numbers »
    2012-04-30 @ 19:33

    […] Eklenti Ana Sayfası […]

  • 17 Useful WordPress Plugins That You Should Install On Your Own Blog « UShareDesign »
    2012-05-08 @ 23:52

    […] WP Page Numbers […]

  • Joelle
    2012-05-28 @ 17:30

    Hi Jens,

    Thanks a lot for developing this amazing plugin. Can you tell me why the theme appears broken on my blog: http://racing-thoughts.com?

    Is there something in the code that I have to change?

    Thanks,

    Joelle

  • Beat
    2012-05-31 @ 18:03

    hi,

    I edited the code from:

    if ( $total_pages == 1 ) { return null;}

    to

    if ( $total_pages == 1 || $total_pages == 0 ) { return null;}

    Now it doesn’t show them in the search when there are no results.
    Before my edit it showed Pages 1 of 0 ;)

    Thanks for the great code :)

  • rasivell
    2012-07-01 @ 12:20

    hi

    please please help me.!! ido know!!

    my plugin dont worked after 1 weak ago!!! its ok until 7 days ago but now dont work!! write 404!!

    please chekit:

    http://www.game-iran.com/shop/page/2/

  • WordPress Plugins for business blogs – which to use? « »
    2012-08-27 @ 19:06

    […] Page Numbers: allowing your readers to quickly navigate around your blog helps their experience of it and allows them to browse your content as they wish. This allows them to delve more easily into your archives. […]

  • 10 Ways to Improve Navigation in WordPress : WordPress Hacks »
    2012-10-08 @ 22:12

    […] Get rid of Ugly Next and Previous Links: Every WordPress homepage, and any page that has lists of blog posts (search, archive), has simple “next” and “previous” links to navigate older posts. I have witnessed (countless times) visitors thinking that all the posts you had to offer were listed on the homepage and that was it (mainly people not familiar with WordPress). You should have a linked list of pages (like google) that says “this is page 1 of…” and links to “2, 3, 4, 5, etc”. It’s easy to fix this with plugins like WP-PageNavi or WP-Page Numbers. […]

  • mohamad »
    2013-01-15 @ 17:09

    tank you for plugin.

  • Redesign a lá Google Plus, přechod na webhosting a WordPress, tipy na pluginy a vše s tím spojené | Osobní blog Petra Vaníčka »
    2013-01-25 @ 19:15

    […] WP Page Numbers – Místo klasického “Předchozí a novější články” zobrazí číslování jednotlivých stránek se seznamy článků. […]

  • Mache »
    2013-02-28 @ 21:14

    Hi
    thanks for your plugin first. I need to ask help to fix a page where it’s not working well (here:http://layabozi.com/category/albums-bands-live-music/albums-reviews/) the numbers are there and if i click them they do move back on the url but the page still the same, I think it’s because this is a page with a roll for just one category, I’ve tried to figure out what’s causing it, but I just have not after many many many tries. I give up. please help.

  • jan »
    2013-03-10 @ 10:32

    great plugin! looks much better, now!