I have a category (cat1) with 2 sub-cats (cat1a and cat1b). 19 entries belong to cat1, but 9 are in the sub-cats.

On the 1st level category page (cat1) is there a way to not show the 9 entries that are in the sub-cats?

Sub-categories aren't set in stone either, meaning client will add more sub-cats periodically.

Channel entry tag is being used by the way.


3 Answers 3


You may have Auto-Assign Category Parents turned on, which automatically assigns the category parent when you choose a child category on save. So when viewing Cat1, all of Cat1a entries will also be displayed since the parent category is automatically set.

To turn off, go to Admin > Channel Admin > Global Channel Preferences.

Also, you will need to then go and update the 9 entries and remove the parent category. You can do this in bulk from the edit entries page. Find all 9 entries, click the checkbox next to each, then at the bottom, choose remove categories. Select the category parent to be removed.

  • I knew I was forgetting something stupid.
    – Tad Ward
    Jan 11, 2013 at 2:47

Unless I've missed something here could you not simply use the parent_only="yes" paramater on the channel categories tag?


If you were looking to do something slightly more complex you could always try the GWcode Categories plugin http://gwcode.com/add-ons/gwcode-categories

  • Sorry forgot to mention its the channel entries tag i am using, so no parent_only parameter.
    – Tad Ward
    Jan 11, 2013 at 2:46

One answer here (as mentioned) is to disable Auto-Assign Category Parents.

But, on a site where i rely on that setting to be available, i display the entry conditionally inside the categories tag. Say you want entries for category id 20 only, not children of 20, then i use a condition (or switchee) on the parent_id:

{!-- preload replace trick with segment conditional to set default --}
{if segment_2_category_id ==""}

{exp:channel entries category="{my_cat_id}" ...}
    {if parent_id != "{my_cat_id}"}
      {!-- display the entry --}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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