Previous and Next Post links do not appear

Community Forums Forums General Discussion Previous and Next Post links do not appear

This topic is: not resolved

This topic contains 3 replies, has 2 voices, and was last updated by  braddalton 1 year, 8 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #21990

    echofoxtrot
    Participant
    Post count: 33

    For a Genesis/Prose site:

    I have the following code in a custom loop. It should start with the 3rd post (of about 72), display the posts, and then show navigation links “Previous Posts” and “Next Posts” at the end. The site is set to display 10 posts per page.

    However, the previous and next links do not appear. If I change the posts per page setting in Settings/Reading, that works correctly.

    Any ideas would be appreciated greatly! Thank you in advance. Code follows –

    $temp = $wp_query;
    $wp_query = null;
    $paged = (get_query_var (‘paged’) ) ? get_query_var (‘paged’) : 1;
    $priorPosts = new WP_Query(‘offset=2&cat=-37&paged=’ .$paged);
    while($priorPosts->have_posts() ):
    $priorPosts->the_post();
    ?>
    <h2><?php the_title(); ?></h2>
    <?php the_content(); ?>
    <?php endwhile; ?>

    <div class=”paging”>
    <div class=”right”><?php previous_posts_link(); ?></div>
    <div class=”left”><?php next_posts_link (); ?></div>
    </div>
    <?php
    $wp_query = null;
    $wp_query = $temp;
    ?>

    #22394

    braddalton
    Participant
    Post count: 10671

    Can you link to your site please.


    #22452

    echofoxtrot
    Participant
    Post count: 33

    Link to the site: http://panma.org

     

    Thanks!

    #33460

    braddalton
    Participant
    Post count: 10671
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.