I faced weird issue on single.php. I used previous_post_link('%link', 'Previous'); and next_post_link('%link', 'Next'); for next previous in single.php, it's working perfectly, but its work on all categories posts.

Now I want on same category posts 'next - previous' pagination. I use these links Next and Previous.

When I write third parameter 'true or false' in my previous or next link

previous_post_link('%link', 'Previous', true);
next_post_link('%link', 'Next', true);

the link hides. I don't know what's happening wrong.

  • 1
    You are most probably making use of custom taxonomies in which case you need to set the $taxonomy parameter Jan 8 '15 at 6:05
  • I also set bro like this previous_post_link('%link', 'Previous', true, '', 'my_taxonomy'); Jan 8 '15 at 6:07
  • Strange. This should work. You definitely have something else going on here, and unfortunately it is not something anyone can pin point correctly. You will need to debug this. Also look at any custom queries there might be on your single.php or any function making use of one. Switch to a bundled theme and check if you get the same output. I know this is way to extensive for your needs, but test out my post links found here. Test it and see. By default it page between posts in the same category Jan 8 '15 at 6:18
  • ok i'll try this Jan 8 '15 at 6:21

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.