Forums Forums Search & Filter Pro different filters for category pages

Viewing 6 posts - 1 through 6 (of 6 total)
  • Anonymous
    #220077

    Hi,
    I would like to achieve:

    – need to filter products and product variations (two post types)
    – would like to have different filters for category archive pages. For example: On category archive page for clothing I don’t need to show filter for “shoe size” taxonomy. I think that it is possible to make 2 filters with different attributes and show specific filter for specific category archive page. Maybe would be better to hide/show attributes depends on category pages (only one instance of filter would be needed).
    – filtered products (display results) should also showed on category archive page

    Could you please help me, how can I achieve that ?

    Regards,

    Trevor
    #220080

    You can only have one WooCommerce search form, which will need all the possible fields in it, and then use custom CSS to hide different fields on specific pages. To an extent, and with useful screenshots, this is discussed here I think:

    https://support.searchandfilter.com/forums/topic/woocommerce-integration-avoid-redirection-to-shop-page/#post-208464

    Anonymous
    #220112

    “You can only have one Woo search form”
    How can I then understood one of your top feature, which you claim on your site: “Unlimited Search Forms – Create as many different search forms as you like! Why not put 2 on the same page?”

    You’ve written about CSS, but it will needed also some JS codes.
    Is it possible to hide it on server side ? Maybe with any hooks (add_action) stuff.

    When I change Display Results to “Post Type Archive” I can use one post type (product / product variation) only.

    Trevor
    #220124

    You raise two issues. The first about creating as many forms as you want. You can, but because the WooCommerce/Post Type Archive display methods attach to the wp_query in the archive template pages of the Post Type, only one form can attach per Post Type archive template, otherwise they would conflict. You can still add forms with other types of display methods to your site.

    To the second question, it is possible to put more than one form on the same page, as long as that page is not the results page for more than one of those forms (any other form must go to another page to show its results. The reason here is that forms do not interact with each other (so, a field in one form will not see any changes in the same field in another form) as we use JavaScript to submit the form and process the filters.

    As to needing JS code, it should not. Make the all-in-one form, place it on two pages, show me those pages and tell me which fields need to disappear on each page, and I will show you the CSS.

    The WooCommerce method is a special case of the Post Type Archive method (and so cannot be used at the same time as a form using the post Type archive method when searching ‘products’. This WooCommerce method is special in that it allows you to select both ‘products’ and ‘variations’, as for WooCommerce there is a special WooCommerce archive template that combines both in to one page. Thus, the normal Post Type Archive method cannot select both Post Types, as indeed it cannot select more than one Post Type of any type.

    Anonymous
    #220691

    After some labouring, it works.
    In addition to screenshot which you mean in previous post, I need to add also field for taxonomy of archive pages. Without it, it not works.

    Trevor
    #220696
    This reply has been marked as private.
Viewing 6 posts - 1 through 6 (of 6 total)