Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.