2

next/prev from my first to last and the other way around cant find a solution for that i am using this code for next

  <?php next_post_link('%link','<img src="img-location"/>'); ?>

and this for prev

  <?php previous_post_link('%link','<img src="img-location"/>'); ?>

here is the first post

0

You may install this plugin and then for the next link, use:

<?php c2c_next_or_loop_post_link('%link','<img src="img-location"/>'); ?>

and for the previous link use:

<?php c2c_previous_or_loop_post_link('%link','<img src="img-location"/>'); ?>

That's it. Now the previous link of your first post should be the last post and the next link of your last post should be the first post.

If you don't want to install any plugin, then you may follow the instructions from this post to see how it can be done with custom CODE.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.