Support » Plugin: Display Posts Shortcode » Would not view Sub Categories

Viewing 1 replies (of 1 total)
  • Plugin Author Bill Erickson

    (@billerickson)

    Unfortunately that’s just how WordPress works. Child categories (subcategories) are contained within parent categories, so all posts in a subcategory are also in the parent category.

    You might be able to use the taxonomy parameters to craft a complex query where you list the categories included (parent category) AND list the categories excluded (all the sub-categories). See the bottom of the wiki for more information: https://github.com/billerickson/display-posts-shortcode/wiki

    Untested, but something like this might work: [display-posts taxonomy=”category” tax_term=”parent_category” taxonomy_2=”category” tax_2_term=”child_cat_1, child_cat_2″ tax_2_operator=”NOT IN”]

    Providing additional assistance is beyond the free support I offer.

Viewing 1 replies (of 1 total)
  • The topic ‘Would not view Sub Categories’ is closed to new replies.