HUSKY - WooCommerce Products Filter Professional

How to Show Different Filters on Different Pages

[woof] shortcode accepts attributes that let you control which filters appear and which products they show.

Main attributes:

  • tax_only – Show only specific taxonomies (categories, attributes)
  • by_only – Show only specific non-taxonomy filters (price, SKU, stock, etc.)
  • taxonomies – Show only specific taxonomy terms (used with dynamic recount)

Shortcode Examples

Filter Specific Taxonomies

Show only category and brand filters:

[woof tax_only="product_cat,pa_brand"]

Filter Non-Taxonomy Elements

Show only price, SKU, and stock filters:

[woof by_only="by_price,by_sku,by_instock"]

Combined: Taxonomies + Non-Taxonomy Filters

Show specific taxonomies AND non-taxonomy filters:

[woof tax_only="product_cat,pa_size,pa_color" by_only="by_price,by_instock"]

Using taxonomies Attribute (For Dynamic Recount)

Show only specific terms from specific taxonomies:

[woof taxonomies="product_cat:35,42,58+pa_brand:nike,adidas"]

Note: The taxonomies attribute is used when you have “dynamic recount” or “hide empty options” enabled.

Complete Setup Guide

Step 1: Create Your Shortcodes

Create different [woof] shortcodes for each page with appropriate attributes.

Example:

  • Supplier A: [woof tax_only="product_cat,pa_size,pa_color" by_only="by_price"]
  • Supplier B: [woof taxonomies="product_cat:50+pa_brand:nike,adidas" by_only="by_price"]

Step 2: Place Shortcodes in Widgets

  1. Go to Appearance → Widgets
  2. Add Text or Custom HTML widget to your sidebar
  3. Paste your shortcode into the widget
  4. Create separate widgets for each shortcode

Step 3: Install Conditional Widget Plugin

You need a plugin to control widget visibility based on page conditions.

Choose one:

Step 4: Set Visibility Conditions

Add conditional logic to each widget to control where it appears.

Conditional Logic Examples

Show Filter on Specific Page

By page slug:

is_page('supplier-nike')

By page ID:

is_page(123)

Show Filter on Multiple Pages

is_page(array('supplier-1', 'supplier-2', 'supplier-3'))

Show Filter on Category Archive

By category ID:

is_product_category(35)

By category slug:

is_product_category('electronics')

Show Filter on Custom Taxonomy

is_tax('supplier', 'nike-products')

Exclude Specific Pages

Show everywhere EXCEPT page 123:

!is_page(123)

Complete Example Setup

Scenario: 3 Suppliers with Different Filters

Supplier A (Nike) – Page ID: 123

  • Shortcode: [woof tax_only="product_cat,pa_size,pa_color" by_only="by_price"]
  • Widget Condition: is_page(123)
  • Result: Shows all product categories with size, color, and price filters

Supplier B (Adidas) – Page slug: adidas-products

  • Shortcode: [woof taxonomies="product_cat:40,41,42" by_only="by_instock"]
  • Widget Condition: is_page('adidas-products')
  • Result: Shows only categories 40, 41, 42 with stock filter

Supplier C – Category Archive ID: 50

  • Shortcode: [woof tax_only="product_cat,pa_brand" by_only="by_price,by_sku"]
  • Widget Condition: is_product_category(50)
  • Result: Shows categories, brands, price, and SKU filters

Understanding Attributes

tax_only vs taxonomies

Use tax_only when:

  • You want to show entire taxonomies (all terms)
  • Example: tax_only="product_cat,pa_brand" shows all categories and all brands

Use taxonomies when:

  • You have “dynamic recount” or “hide empty options” enabled
  • You want to show specific terms from specific taxonomies
  • Example: taxonomies="product_cat:35,42+pa_brand:nike" shows only categories 35 & 42, and only Nike brand

by_only Values

Available non-taxonomy filters for by_only:

  • by_price – Price range slider
  • by_sku – Search by SKU
  • by_text – Text search
  • by_author – Filter by author
  • by_onsales – Show only on-sale products
  • by_instock – Show only in-stock products
  • Meta field keys (if enabled in WOOF settings)

Use by_only="none" to hide all non-taxonomy filters.

Finding IDs and Slugs

Category IDs

  1. Go to Products → Categories
  2. Hover over category name
  3. Look at browser status bar or URL
  4. Find tag_ID=35 – the number is your category ID

Page IDs

  1. Go to Pages
  2. Hover over page name
  3. Look at URL: post=123
  4. The number is your page ID

Attribute Slugs

  1. Go to Products → Attributes
  2. Attribute slugs start with pa_
  3. Examples: pa_brand, pa_size, pa_color, pa_material

Testing Your Setup

  1. Test shortcodes first
    • Place shortcode directly on a test page
    • Verify filters display correctly
    • Check that filtering works
  2. Test widget visibility
    • Visit each page where filter should appear
    • Verify correct filter displays
    • Check that other filters don’t appear
  3. Verify only one filter per page
    • Multiple filters on same page will conflict
    • Use widget conditions to ensure exclusivity

Important Limitation

Only one filter per page: Only one WOOF filter can be active on a page at a time. Multiple filters will conflict.

Solution: Use widget conditional logic to ensure only one filter widget displays per page.

Tips

  1. Test shortcodes directly first
    • Before adding to widgets, test shortcodes on a regular page
    • Ensures attributes are correct
  2. Use exclusive conditions
    • Make sure widget conditions don’t overlap
    • Only one filter should be visible per page
  3. Negative conditions
    • Use !is_page(123) to exclude specific pages
    • Useful for “show everywhere except” scenarios
  4. Check attribute slugs
    • Attribute slugs must start with pa_
    • Wrong slug = filter won’t appear

Full Documentation

For complete shortcode attribute reference: https://products-filter.com/shortcode/woof

Troubleshooting

Filter Not Appearing

Possible causes:

  • Widget condition is false for current page
  • Shortcode attributes incorrect
  • Category/attribute IDs don’t exist
  • Multiple filters conflicting

Solution:

  • Verify page ID/slug matches condition
  • Check category IDs in Products → Categories
  • Test shortcode on regular page first
  • Ensure only one filter widget per page

Wrong Products Showing

Possible causes:

  • Category IDs incorrect
  • Attribute slugs wrong
  • Using wrong attribute (tax_only vs taxonomies)

Solution:

  • Double-check category IDs
  • Verify attribute slugs start with pa_
  • Use taxonomies if you have dynamic recount enabled
  • Test with simpler shortcode first

Multiple Filters Displaying

Cause: Widget conditions overlap

Solution:

  • Review all widget conditions
  • Ensure mutual exclusivity
  • Use negative conditions to separate

Filter Shows on Wrong Pages

Cause: Widget condition too broad

Solution:

  • Make condition more specific
  • Use page ID instead of category if needed
  • Test condition logic carefully

Summary

To show different filters on different pages:

  1. Create custom [woof] shortcodes with tax_only and/or by_only attributes
  2. Place each shortcode in separate Text/HTML widgets
  3. Install Widget Logic plugin
  4. Add conditional logic to each widget (e.g., is_page(123))
  5. Test to ensure only one filter displays per page

Remember: Only one filter can be active per page. Use widget conditions to ensure exclusivity.

 


Troubles? Ask for Support!