• Hi,

    I’m looking for more control over wp_link pages. Namely, I want pagination to look more like it looks right here on these forums (like what appears at the top/bottom of lists of posts).

    Something like
    <prev 1 2 3 4 5 Next>

    So I want to show both next AND number in next_or_number and I want to be able to wrap a different style around the selected number so it can highlight another color.

    any advice as to how to do this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Here’s the code that I use to display that. Be warned, it’s ugly. If you break it up into pieces, you can see what I did.

    wp_link_pages(array(‘before’ => ”, ‘after’ => ”,’next_or_number’ => ‘next’, ‘nextpagelink’ => ”, ‘previouspagelink’ => ‘<Prev ‘));
    wp_link_pages(array(‘before’ => ”,’after’=>”,’next_or_number’ => ‘number’));
    wp_link_pages(array(‘before’ => ”, ‘after’ => ”,’next_or_number’ => ‘next’, ‘nextpagelink’ => ‘ Next>’, ‘previouspagelink’ => ”));

    Thread Starter sgatz

    (@sgatz)

    ippo, thanks. I’ll give that a try. it seems quite smart (and why didn’t I think of that).

    –scott

    Thread Starter sgatz

    (@sgatz)

    I tried this and it is very close.

    The one caveat (for people reading) is that just putting ” as a value in nextpagelink or previouspagelink only removes the text, it doesn’t remove the link. So you get a in your html. since I style links, it shows up in my theme. I’ll have to play with it a bit to remove that, but I think I can make it work.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘more control over wp_link_pages?’ is closed to new replies.