• Hello,

    I am building my theme from scratch, so I have basically built what I am working on from the ground up.

    In my header I have the following:

    • <?php wp_title(”); ?>
    • #comments”><?php comments_number(‘no comments yet’,’1 comment’,’% comments’)?>
    • <li id=”prev”>
      <?php previous_post_link(‘%link’, ‘«’); ?>
      <?php if(!get_adjacent_post(false, ”, true)) { echo ‘<span>«</span>’; } // if there are no older articles ?>

      <li id=”next”>
      <?php next_post_link(‘%link’, ‘»’); ?>
      <?php if(!get_adjacent_post(false, ”, false)) { echo ‘<span>»</span>’; } // if there are no newer articles ?>

    My issue is, it works fine on the single post pages, but if you come in directly to the main blog page, not everything displays or works properly. If I am understanding things correctly, this chunk needs to be ‘in’ the loop to work. However when I move the start of the loop, all I get is errors.

    Any ideas/thoughts?

    Here are the two “pages” of working/not completely working.

    https://brainofj.com/blog/ (notice comments are listed, but previous/next are disabled)

    https://brainofj.com/blog/2009/11/another-post/ ( single post with the nav working as I want it to on all pages)

    Thanks

  • The topic ‘Single page nav vs. main page nav’ is closed to new replies.