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”