• hi guys Im looking for someone who could help me on my problem. . . The older post navigation link at the bottom of blog page doesnt seem to work. . . can anybody help me?

    heres the link to my site makeyourtheme

    heres the codes I have ` <?php
    $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
    if ($paged < 2) {
    query_posts(“posts_per_page=1&offset=(3 * $paged) + 1”);
    }
    ?>

    <?php query_posts(‘&cat=-4&posts_per_page=3’); ?>

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

    <?php while (have_posts()): the_post();?>

    <div <?php post_class() ?> id=”post-<?php the_ID();?>”>
    <div class=”latest”>
    <div class=”blogtitle”><h2> “><?php the_title();?></h2></div>

    <p class=”dateposted”>Posted on: <?php the_time(‘l, F jS, Y’) ?> at <?php the_time() ?></p>
    <p class=”author”>by:<?php the_author(); ?></p>
    <hr />
    <div class=”excerpt”><?php the_excerpt();?></div>
    </div>

    </div>

    <?php endwhile; ?>
    <?php next_posts_link(‘« Older Entries’) ?>
    <?php previous_posts_link(‘Newer Entries »’) ?>
    <?php else: ?>

    <?php endif;?>`

    Any help would be much appreciated here

Viewing 1 replies (of 1 total)
  • if ($paged < 2) {
    query_posts("posts_per_page=1&offset=(3 * $paged) + 1");
    }
    ?>
    
    <?php query_posts('&cat=-4&posts_per_page=3'); ?>

    no idea why you use a if statement on the query_posts() with the paged parameter;
    (you might want to explain this with a few more words)

    but this is not even the point:
    whatever you set in the first two lines of the snippet above, will always be overwritten by the last line above, which does not include the paged parameter.
    ignoring your if statement’s purpose, instead of the last line, you could try:

    <?php query_posts('&cat=-4&posts_per_page=3$paged=$paged'); ?>

Viewing 1 replies (of 1 total)
  • The topic ‘older post link not working on blog page’ is closed to new replies.