WooCommerce – filter products by catalog visibility

1. For WooCommerce 3.0.0 and higher

  • Shop and search results:
    Under Filter Settings > Filter by Taxonomy:
    – Select Taxonomy: Visibility
    – Select Terms: exclude-from-search and exclude-from-catalog
    – Operator: NOT IN
    Content-Views-Pro-show-shop-and-search-products-of-WooCommerce.png

  • Shop only:
    Under Filter Settings > Filter by Taxonomy:
    – Select Taxonomy: Visibility
    – Select Terms: exclude-from-search
    – Operator: IN
  • Search results only:
    Under Filter Settings > Filter by Taxonomy:
    – Select Taxonomy: Visibility
    – Select Terms: exclude-from-catalog
    – Operator: IN
  • Hidden:
    Under Filter Settings > Filter by Taxonomy:
    – Select Taxonomy: Visibility
    – Select Terms: exclude-from-search and exclude-from-catalog
    – Operator: AND
You need to pass extra parameters to the View to show products which have “Catalog visibility”:

  • Shop and search results:
    [pt_view id="VIEW_ID" taxonomy=product_visibility terms="exclude-from-search,exclude-from-catalog" operator="NOT IN" reuse_tax_query=1]
  • Shop only:
    [pt_view id="VIEW_ID" taxonomy=product_visibility terms="exclude-from-search" reuse_tax_query=1]
  • Search results only:
    [pt_view id="VIEW_ID" taxonomy=product_visibility terms="exclude-from-catalog" reuse_tax_query=1]
  • Hidden:
    [pt_view id="VIEW_ID" taxonomy=product_visibility terms="exclude-from-search,exclude-from-catalog" operator="AND" reuse_tax_query=1]

Please replace VIEW_ID with ID of your View.

2. For WooCommerce 2.6.14 and before.

To filter products by catalog visibility, please:

  • enable Filter Settings > Advance > Custom Fields
  • click Add New button to start filtering by a custom field.

Then select:

  • _visibility for Field Key
  • Text for Value Type
  • For Value To Compare, there are 4 possible values: visible (Catalog/search), catalog, search, hidden
  • For Operator To Compare, select LIKE to filter products which have selected visibility, select NOT LIKE to filter products which don’t have selected visibility

Best regards,