WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i have a specific post category, eg. id=x which is not shown in category list.

These posts are password protected and should be visible only to those provided with the link.

However current version still allows see posts from all categories using prev/next posts.

What is the easiest way to ommit some of these category id=x from paging?

share|improve this question
up vote 0 down vote accepted

You should be able to exclude the category you don't want to show by adding $excluded_terms to your navigation links. So for example, if the category you don't want showing up is id 4 your link would look like:

<?php next_post_link( '%link', 'Next Post', false, '4' );?>

Same with previous_post_link().

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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