How to Exclude Sub-category Products from a Category-based Feed.

When you build a feed around a WooCommerce category, you usually want that category’s own products but not everything sitting in its child (sub-) categories — or you want to keep the parent items and drop one particular subcategory. This guide explains how CTX Feed decides which category a product belongs to, and the two reliable ways to keep subcategory products out of a category-based feed.

This feature requires CTX Feed Pro. On the free plugin the Product categories control on the Filters tab is shown with a PRO lock, and a saved selection is not applied.

How CTX Feed matches categories

Before you choose an approach, it helps to know exactly how the category filter decides:

  • CTX Feed keeps or drops a product based on the categories that are directly assigned to it. It matches the exact category terms you pick — not a whole branch of the category tree.
  • A product that lives only in a subcategory (for example, Men → Shirts) is not automatically treated as being in the parent (Men). So if you include only the parent term, subcategory-only products fall outside the match and are left out on their own.
  • The one thing that trips people up: WooCommerce lets a product be assigned to several categories at once. A product tagged with both the parent and the subcategory carries the parent term, so it will match a parent-category include. If subcategory products keep slipping into your feed, they are almost always also assigned to the parent category.
  • For variations, CTX Feed checks the parent product’s categories — a variation inherits its parent’s category assignments.

Option A — Include only the parent category

Use this when you want just the products assigned directly to the parent category and nothing from its subcategories.

  1. Open CTX Feed → Manage Feeds and click the feed name to edit it (or Make Feed to start a new one).
  2. Open the Filters tab.
  3. In the Product selection list, find Product categories.
  4. Select only the parent category.
  5. Leave the mode toggle on Include.
  6. Click Save & generate.
CTX Feed Filters tab Product selection with one parent category chosen in Product categories and the Include mode selected
  1. Product categories — only the parent category is selected.
  2. Include — the feed keeps only products assigned to that category.

Only products carrying the parent category term are written to the file. Any product assigned solely to a subcategory is excluded. (A product assigned to both the parent and a subcategory still comes through, because it has the parent term — for those, use Option B or remove the parent assignment on the product.)

Option B — Exclude specific sub-categories

Use this when you want the rest of your catalogue but guarantee that everything in one or more named subcategories is dropped — even products that are also in the parent.

  1. On the Filters tab, open Product categories.
  2. Select the subcategories you want to remove (for example, Clearance or Accessories).
  3. Set the mode toggle to Exclude.
  4. Click Save & generate.

Every product that carries one of the excluded subcategory terms is dropped, whatever else it is assigned to; every other product in your catalogue stays. In Exclude mode a product is dropped as soon as it carries any listed term, so this is the dependable way to make sure a subcategory never reaches the channel.

The mode toggle applies to the whole category list — you pick Include or Exclude for the selection, not per category. If you need to keep some categories and drop certain subcategories with different logic in the same feed, build two feeds, or use the Advanced filters tab (Pro) for condition-based rules.

Which option should I use?

  • Products are cleanly assigned (subcategory-only products don’t also carry the parent) → Option A (Include the parent) is the simplest.
  • Products are double-assigned, or you only care about removing one subcategory → Option B (Exclude the subcategory) is the safest.

Troubleshooting

  • Subcategory products still appear after Option A. Those products are also assigned to the parent category. Either remove the parent assignment on each product in WooCommerce, or switch to Option B and exclude the subcategory outright.
  • The feed comes out empty. You may have selected a subcategory in Include mode that has no directly-assigned products, or set Exclude on the only category your products use. Recheck the mode toggle and your selection.
  • Old items still show on the channel. Regenerate the feed after saving; the channel re-fetches your feed URL on its own schedule.
Try CTX Feed for WooCommerce - Free Download or Upgrade to Pro

Leave a comment.