0

Very strange problem, i have uploaded lots of photos and made posts for each of them so i have them in order 1 to 120.

I have used next_post_link and previous_post_link in my loop eg.

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

    <div class="column0">
      <article>
        <nav> 
          <div class="prev"><?php previous_post_link('%link','&larr;'); ?></div>
          <div class="next"><?php next_post_link('%link','&rarr;'); ?></div>
        </nav>
        <?php the_content(); ?>
      </article>
    </div>

    <?php endwhile; endif; ?>

But when i go to post 01, which should have a link to 02 i get a link back to 44 then 39 then 70 then nothing!

Very strange order, they are all in the same month and year so should just go back and forth fine.

I'm very confused, anyone else had this problem

  • 2
    How do you have them ordered? What is the mechanism? – s_ha_dum Feb 28 '14 at 17:21
  • I am just letting Wordpress do the ordering, so it should just be chronological. The order when i go into the CMS, starts at 1 then goes up so 1 is the newest. – benpalmer Mar 4 '14 at 12:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.