Support » Fixing WordPress » Next page link on front page

  • Resolved false1


    Hey folks

    I wonder if it’s possible to have a next page link at the bottom of your front page? I have options set to display 10 posts on the front page. I’d like to put a link on the bottom to go to the next 10 posts and from that page forward to the next 10 or back to the previous 10. Is that possible? I haven’t been able to find anything about it.


Viewing 7 replies - 1 through 7 (of 7 total)
  • MichaelH


    If you were using the WordPress Default theme, you would see that the wp-content/themes/default/index.php file uses this code to do that:

    <div class=”navigation”>
    <div class=”alignleft”><?php next_posts_link(‘« Older Entries’) ?></div>
    <div class=”alignright”><?php previous_posts_link(‘Newer Entries »’) ?></div>

    Stepping Into Templates
    Stepping Into Template Tags
    Template Hierarchy



    Thanks MichaelH, it’s not working though.

    I put the code you listed in the same place on my current theme as it appears in the default theme.

    I deleted this piece of code that was in my current theme because it seemed redundant:
    <div class="Nav"><?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?></div>

    The links appear but take me to the same posts. I don’t go to the older posts.

    If I change my theme to the default the code works fine.





    So it works fine with the Default theme so something in your theme is causing the problem.

    May need to post your index.php in a pastebin and report the link back here.



    I posted the code to this address:

    Ohblue I looked at that post. I am using query_posts. that string of code didn’t help though. Thanks anyway.



    If you delete this code:

    if (is_home()) {

    does it work?



    Yeah, it works now.

    I had to add this code to keep that category from displaying

    <?php if (in_category('85') && is_home() ) continue; ?>

    that query_posts is kinda particular, huh?

    thanks again

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Next page link on front page’ is closed to new replies.