Multipage Index

A problem with some indexes is that they are very, very long, and are a pain to scroll through.  One way to reduce the amount of scrolling required is to spread the index over multiple pages.  To do this, go to the settings page and turn on the following two options:

  • Use multiple pages
  • Display an alphabetical heading at the start of every page

You only need the first of these to get a multipage index, but if you don’t turn on the second one, there will be no alphabetical heading at the top of the first column on the page when a section straddles two pages, so it’s usually better to turn it on too.

Before you save, notice that another settings field has appeared near the bottom of the settings page–called “Number of items per page.”  This is where you specify how many items you want to see on one page.  For the example index below, it is set to 20.  Since there are 100 posts in the blog, that means there are five pages in this index.  (Note: if you don’t specify a value for the number of items per page, then selecting the “use multiple pages” option has no effect.)

Notice also that a set of page links has appeared above the alphabetical links, so readers can page through the index if they’re just browsing.  If they know which part of the index they need to look at, they can still use the alphabetical links to navigate directly to the start of a section.  If that section is not on the current page, then clicking an alphabetical link will take them to the page they are looking for.

Some people prefer multipage indexes as a stylistic choice–e.g. so readers don’t have to scroll through a very long index–but if you have a large number of items, say, several hundred, in your index then there is a performance issue to consider too.  It can take a few seconds to load and format an index page with hundreds, or thousands of items on it.  An index limited to 50 items per page, for example, may feel a good bit snappier to your readers.  (Note: A caching solution like the WP Super Cache plugin does help in many cases, but if your index is only accessed a few times a day, then the extra caching may be ineffective because, by default, the pages usually go “stale”–are thrown out of the cache–within an hour or so.)

View the index »


No comments yet to

  • Hi everybody,

    I agree with all of you: this is a very Great Plugin! Thanks to Mike .

    Now I need your help (Mike or anybody who could) .

    1- I create an author index on my site . It seem working very well . But how I can group items with the same heading under one main entry without selecting subheadings ? I mean each author name appear only once and when we click on it we’ll see all his post. Please take a look on my page

    2- I have another site (same server, same hosting) but the author index page on this site can’t be read (please click on this link for reading the error message)

    Many thanks in advance

    LW

  • 2- I have another site (same server, same hosting) but the author index page on this site can’t be read (please click on this link for reading the error message)
    Sorry ! I don’t know why the above link is not working .

  • GREAT plugin, thank you!!

    @curtis klope, thanks so much for the tweak, i was experiencing the same issue and was so not looking forward to diving into the code, so was thrilled to find a quick solution!

    i think it is a bug and your fix should be rolled into the next release…