Support » Fixing WordPress » Previous / Next Page in List?

  • I’d like to put links to the previous/next page in an unordered list with the rest of my navigational elements, however the post_nav_link function outputs a link without allowing any sort of “wrapper.” This means, if the link is unavailable I end up with a blank list item. Worse, it outputs something like when there is no previous/next page available.
    I’m using WP 1.3-5a; is there a new function for this purpose, and if not, how can I do what I’ve described?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Mark (podz)

    (@podz)

    Support Maven

    If everything else fails, you could always go down to the source code and modify it.
    The original function was probably designed to be used only once in one container, and it will never be empy ’cause either or both will always show up.

    Well, modifying the code isn’t really acceptable for me, since I like to upgrade WP often to the latest nightlies (and don’t really want to change the code every time).
    Personally, I’m a little surprised this function is so inflexible, since the next_post and previous_post functions are so robust.

    You could save the modified code somewhere else, e.g. in my-hacks.php, with different function name, of course, and call that from your index.php

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Previous / Next Page in List?’ is closed to new replies.