Viewing 8 replies - 1 through 8 (of 8 total)
  • all you need to do is this::

    <?php next_posts_link('Earlier Posts') ?>
    <?php previous_posts_link('Recent Posts') ?>

    The words ‘earlier posts’ and ‘recent posts’ can be edited to be whatever you want to display on your page…

    that solve ur problem??

    Thread Starter bootybandit

    (@bootybandit)

    I don’t understand where you have to plop that code? I have tried on the index.php but think i am putting it in the wrong spot

    Put it in the index page (assuming that is the file which displays your posts) somewhere just before the close of the loop and/or after the start.

    Thread Starter bootybandit

    (@bootybandit)

    Hey this is where i put the code still doesnt show up?
    <?php get_header(); ?>

    <div id=”content” class=”narrowcolumn”>

    <?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>
    <?php next_posts_link(‘Earlier Posts’) ?>
    <?php previous_posts_link(‘Recent Posts’) ?>

    <div class=”post” id=”post-<?php the_ID(); ?>”>
    <h2>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></h2>
    <small><?php the_time(‘F jS, Y’) ?> <!– by <?php the_author() ?> –></small>

    <div class=”entry”>
    <?php the_content(‘Read the rest of this entry »’); ?>
    </div>

    Thanks for the help guys!

    It depends where do you want it.
    I have it like this:
    <?php endwhile; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>

    <?php endif; ?>
    <div class="paged">
    <?php posts_nav_link(' &nbsp; ', __('&laquo; Previous Page'), __('Next Page &raquo;')); ?>
    </div>
    which is after the Loop. And it is in its own div class – to be able to style it in the css file.

    Thread Starter bootybandit

    (@bootybandit)

    Hey i plopped this code where you said

    <?php endif; ?>
    <div class=”paged”>
    <?php posts_nav_link(‘   ‘, __(‘« Previous Page’), __(‘Next Page »’)); ?>
    </div>
    Now when i write a post hello, it just adds it to the main page and the next page previous page dont show up at the bottom?

    Thanks for the troubleshooting

    Is there any “previous” page? I mean if your settings are to show 20 posts on the main page but you have only 9 posts… why should there be a previous link?

    Thread Starter bootybandit

    (@bootybandit)

    Hey Moshu

    Thanks i didn’t realize there was that option. I appreciate the help guys have a good day!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Add next page to main page’ is closed to new replies.