Home Forums Weaver Xtreme Theme Post Navigation – Exclude Categories Help Please

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #17940


    I believe this to be a WP question as opposed to a Weaver question, but I’m hoping a sharper mind than mine can help.

    I’m wishing to exclude categories 83,84 from the next/previous posts navigation on the single page view. I’ve looked at $excluded_terms in the Codex, but have had no success in getting it to work. A day of searching the Net has not provided me with a solution either.

    Not that I think it will help, but I’ll include a link to the site in question: EncounterNewfoundland.com

    Thanks for your time,


    You would have to write a child theme with a replacement single.php file and use the $excluded_terms parameter right after the $cats in the calls to next/previous_post_link.

    The codex says:

    (string/array) (optional) Array or a comma-separated list of numeric terms IDs from which the next post should not be listed. For example array(1, 5) or ‘1,5’.

    I think, for example

    <div class=”nav-previous”><?php previous_post_link( ‘%link’, __( ‘<span class=”meta-nav”>&larr;</span> Previous’,’weaver-xtreme’), $cats, ‘83,84’ ); ?></div>


    Thank-you, that did the trick. Not sure where my brain was @ with this. lol

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.