Post navigation in same ancestor category (1 post)

  1. squizeers
    Posted 4 years ago #

    I am in a situation where I need the post navigation to work in same ancestor category NOT ONLY IN SAME CATEGORY.
    for example:

    • subcat1
    • subca1-I
    • subcat1-II
    • subcat2
    • subcat2-I
    • subcat2-II

    In the above category structure I want the post navigation to work on all the posts in CATEGORY-A not just subcat1 or subca1-I...

    According to the Codex
    <?php previous_post_link($format, $link, $in_same_cat = true, $excluded_categories = ''); ?>
    provides the navigation "previous post" in same category but how can i get the navigation in same ancestor category?
    Please help

Topic Closed

This topic has been closed to new replies.

About this Topic