WordPress.org

Ready to get started?Download WordPress

Forums

paging not working? (8 posts)

  1. dherren
    Member
    Posted 9 years ago #

    It's not clear to me how the paging option is supposed to work. In the Reading Options page, I've set 10 Posts paged, but there would appear to be no UI for actually changing the page.
    In searching this site, I've found this code:
    <?php posts_nav_link() ?>
    and I've tried pasting it into the index.php file in various locations. It does cause paging to work, though it puts the paging link between each and every post, which I really don't want.
    What is the "posts paged" option for if not for paging, and, how do you get it to work?

  2. Cypher
    Member
    Posted 9 years ago #

    You've probably set the Paging option correctly in the Options section. You just need to find the right place for the posts_nav_link code in your index.php. Try to do it out "The Loop" and you'll get it in the right place.
    Regards

  3. dherren
    Member
    Posted 9 years ago #

    Thanks Cypher.
    > You've probably set the Paging option correctly in the Options section. You just need to find the right place for the posts_nav_link code in your index.php. Try to do it out "The Loop" and you'll get it in the right place.
    After some trial and effort, putting it outside of any number of loops, it would appear to finally be working!
    Now to make it look better instead of the default typeface, alignment, etc...
    Thanks.

  4. dherren
    Member
    Posted 9 years ago #

    OK, so the code above is working and my CSS now styles it in a way I'm at least temporarily happy with. However,
    <?php posts_nav_link() ?>
    generates only a 'next page' / 'previous page'. Is there a tweak for adding "first page" / "last page" as well?

  5. felmon
    Member
    Posted 9 years ago #

    hello, I'm desperately seeking this solution! where exactly did you put the code? (This seems a bit secret.)
    Felmon

  6. OperaManiac
    Member
    Posted 9 years ago #

    just outside the loop would work:
    <?php endif; ?> this marks the end of the WP Loop.

  7. dexter
    Member
    Posted 9 years ago #

    sorry guys,
    but there is no way to get the paging displayed.
    i put in <?php posts_nav_link() ?> directly after the loop.
    in the outputcode there is nothing rendered. strange.
    some advices?
    thanks

  8. Beel
    Member
    Posted 9 years ago #

    Options|Reading|Show X posts_paged

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.