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
- Go to Appearance → Widgets
- Add Text or Custom HTML widget to your sidebar
- Paste your shortcode into the widget
- 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:
- Widget Logic – https://wordpress.org/plugins/widget-logic/
- Show WordPress Widget by Logic – https://github.com/realmag777/Show-WordPress-Widget-by-Logic
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 sliderby_sku– Search by SKUby_text– Text searchby_author– Filter by authorby_onsales– Show only on-sale productsby_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
- Go to Products → Categories
- Hover over category name
- Look at browser status bar or URL
- Find
tag_ID=35– the number is your category ID
Page IDs
- Go to Pages
- Hover over page name
- Look at URL:
post=123 - The number is your page ID
Attribute Slugs
- Go to Products → Attributes
- Attribute slugs start with
pa_ - Examples:
pa_brand,pa_size,pa_color,pa_material
Testing Your Setup
- Test shortcodes first
- Place shortcode directly on a test page
- Verify filters display correctly
- Check that filtering works
- Test widget visibility
- Visit each page where filter should appear
- Verify correct filter displays
- Check that other filters don’t appear
- 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
- Test shortcodes directly first
- Before adding to widgets, test shortcodes on a regular page
- Ensures attributes are correct
- Use exclusive conditions
- Make sure widget conditions don’t overlap
- Only one filter should be visible per page
- Negative conditions
- Use
!is_page(123)to exclude specific pages - Useful for “show everywhere except” scenarios
- Use
- Check attribute slugs
- Attribute slugs must start with
pa_ - Wrong slug = filter won’t appear
- Attribute slugs must start with
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_onlyvstaxonomies)
Solution:
- Double-check category IDs
- Verify attribute slugs start with
pa_ - Use
taxonomiesif 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:
- Create custom
[woof]shortcodes withtax_onlyand/orby_onlyattributes - Place each shortcode in separate Text/HTML widgets
- Install Widget Logic plugin
- Add conditional logic to each widget (e.g.,
is_page(123)) - 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!
