• I have this code in my navigation.php file:

    if ( is_singular() and !is_page() ) { ?>
    <!--BEGIN .navigation-links-->
    <div class="navigation-links single-page-navigation">
    	<div class="nav-previous"><?php previous_post_link( '&laquo; <span class="nav-meta">%link</span>' ); ?></div>
    	<div class="nav-next"><?php next_post_link('%link <span class="nav-meta">&raquo;</span>'); ?></div>
    <!--END .navigation-links-->
    </div>
    <?php } else { ?>
    <!--BEGIN .navigation-links-->
    <div class="navigation-links page-navigation">
    	<span class="nav-next"><?php next_posts_link( '<span class="nav-meta">&laquo;</span> Older Entries' ); ?></span>
    	<span class="nav-previous"><?php previous_posts_link( 'Newer Entries <span class="nav-meta">&raquo;</span>' ); ?></span>
    <!--END .navigation-links-->
    </div>
    <?php } ?>

    and this query in Main Index Template:

    <?php query_posts('showposts=1');

    and in reading settings “blog pages show at most 20 posts”. When I click “Older entries” on home page, it returns a 404 error page. What is wrong?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ailusia

    (@ailusia)

    I have problem with pagination in index. Page 2 and above are the same with page 1. But this is not happen in category.

    My code is :

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts('paged='.$paged.'&cat=-'. $ex_miscellaneous . '&showposts=' . $showcat .'&orderby=post_date&order=desc');?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    My URL is http://gigathemes.com

    Can anyone please give me a hint?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘next_posts_link and previous_posts_link don’t work’ is closed to new replies.