views:

78

answers:

3

Hi all,

My blog that runs on Wordpress has several pages of posts. I have the page navigation set up (so I have a link for "Older Entries" and "Newer Entries").

I was wondering if it's possible to do something like this:

1 | 2 | 3 | 4 ... 32 | Last Page

EDIT: Thanks to Adam, I replaced the wp_list_pages with the wp_link_pages function as follows:

            <?php $pageargs = array(
        'next_or_number'   => 'number'
        ); ?>
    <ul>
        <?php wp_link_pages( $pageargs ); ?> 
    </ul>

I also tried just the default:

<?php wp_link_pages(); ?>

However, it still doesn't work. I'm not getting post pagination. Any ideas?

Thanks, Amit

A: 

You are searching a PageNavigation?

There are so many Scripts for this, the most used one is: WP-PageNavi

It is really easy to implement. You only have to add:

 <?php wp_pagenavi(); ?>

this to your Template File(s).

ahmet2106
+2  A: 

I think wp_list_pages deals with listing content pages, whereas what you're looking for is wp_link_pages which provides pagination.

Hope that helps!

Adam
Hey. Could you please take a look at my EDIT and see if you know how to fix things?
Amit
+1  A: 

WordPress › WP-Paginate « WordPress Plugins does that kind of pagination.

songdogtech
So I can't use wp_link_pages() built in function? why does it not work??
Amit
Looks like the WP function isn't sophisticated enough.
songdogtech
Thank you for your response. Much appreciated
Amit