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

416 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 !

    Svara
  • 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

    Svara
  • 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 [...]

    Svara
  • 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 [...]

    Svara
  • 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” [...]

    Svara
  • 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. [...]

    Svara
  • 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 [...]

    Svara
  • 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 [...]

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

    [...] Eklenti Ana Sayfası [...]

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

    [...] WP Page Numbers [...]

    Svara
  • 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

    Svara
  • 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 :)

    Svara
  • 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/

    Svara
  • 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. [...]

    Svara
  • 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. [...]

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

    tank you for plugin.

    Svara
  • 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ů. [...]

    Svara
  • 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.

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

    great plugin! looks much better, now!

    Svara
  • 10 Ways to Improve Navigation in WordPress | DWH-UK.com : Great Themes at Sensibles Prices! »
    2013-03-21 @ 11:06

    [...] 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. [...]

    Svara
  • armor games battlegrounds 2 »
    2013-04-08 @ 23:22

    I will immediately take hold of your rss feed as I can’t find your email subscription link or e-newsletter service. Do you have any? Please allow me recognise in order that I may subscribe. Thanks.

    Svara
  • Useful WordPress plugins for journalists and news websites | Matt C. A. Smith »
    2013-04-23 @ 12:40

    [...] Page’ buttons and replacing them with page numbers at the bottom of archives and categories. WP Page Numbers is customisable via [...]

    Svara
  • 一些WordPress精品插件推荐 | 镜花水月 »
    2013-05-02 @ 14:04

    [...] By Jens Törnell | Visit plugin site [...]

    Svara
  • 17 Useful Wordpress Plugins That You Should Install On Your Own Blog | Smashing Magazine »
    2013-06-28 @ 14:54

    [...] WP Page Numbers [...]

    Svara
  • Die Linkschleuder Nr. 1 | perun.net »
    2013-08-01 @ 2:47

    [...] WordPress-Plugin: WP Page Numbers (Alternative zu Pagebar) [...]

    Svara
  • My Epic List of Wordpress Resources »
    2013-10-23 @ 5:11

    […] Simple Share Buttons Adder Yet Another Related Posts Plugin for WordPress WordPress HTTPS WP-Polls WP Page Numbers Bulk Page Creator OptionTree Role Scoper wpLike2Get WP Modal Login Social Count Plus CampTix Event […]

    Svara
  • Wordpress plugin for navigation paging »
    2013-11-28 @ 9:25

    […] WP Page Numbers – WordPress plugin for navigation paging, instead of next and previous | jenst.se. […]

    Svara
  • Free WordPress Theme For Personal Blogs – YouAre | CSE BLOG JUST »
    2014-04-09 @ 12:42

    […] some plugins which are included in the download package. Two of them Smart Archives Reloaded and WP Page Numbers are required while rest are recommended but optional to […]

    Svara
  • 自用WordPress插件推荐 | 独立观察员•博客 »
    2014-05-19 @ 13:59

    […] 作者为Jens Törnell | 访问插件主页 […]

    Svara
  • Sitewide Update 3/9 | brasscoestudios.com »
    2014-06-18 @ 9:58

    […] see a visual count of how many visitors were seeing the various sections of the site. I also added page numbers (by Jens Tornell) which allowed me to modify how my various page counts are displayed, rather than […]

    Svara
  • Essential WordPress Plugins That Powers Me - TechShock.net »
    2014-07-16 @ 22:39

    […] WP Page Numbers → […]

    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