Forums Forums Search & Filter Pro Search single product category

Viewing 10 posts - 1 through 10 (of 10 total)
  • Anonymous
    #57990

    Hi,

    I need to use multiple filters on my website but I have a problem. Each one should filter a specific product category in woocommerce.

    I want to set up a page displaying a specific woocommerce product category (I do that with a shortcode [product_category category=”EXAMPLE”]), wich I can filter with a specific filter (I only show this filter on this page with the ‘display widgets’ plugin).

    But, when I filter the page, It searches all the product categories + the url changes to a new one, so the filter widget is gone. I want to stay on the same page during filtering.

    How can I solve this problem?

    Kind regards
    Levi

    Trevor
    #57994

    Initially, two questions for you, if I may?

    1. Which ‘Display Results method’ are you using?
    2. Are the pages that you have made what WordPress calls ‘Pages’ (that is, can be edited in the Pages admin menu), or are they archives type pages, made automatically by WordPress (an example of this latter, in WooCommerce, is the ‘products’ page)?

    Anonymous
    #58058

    Hi Trevor,

    I’m using the “Woocommerce shop” display results method. I want the pages to be wordpress pages. This way I can edit the specific page before and after the products?

    Trevor
    #58062

    OK

    The WC display result method only (reliably) works on the actual shop page. Instead, you may need to use the shortcode method, which then allows you to specify the page, and you can also pre-filter the category. With my sites, I do this a lot, and have one page per category AND one filter/form per category (easy using the post duplicator).

    Anonymous
    #58073

    When I use the “shortcode” display result method, the pages work fine.
    I now got a page with a specific filter that stays at the right place, when I filter.

    But, the filter stil filters all the product_categories! Not a single categorie.
    And now the results display is “not great”, I want the results to be displayed like a regular woocommerce store.

    What can I do to solve these last 2 things?

    Trevor
    #58075

    You would have one form per page, and if in the setup you go to the Tags, Categories … tab, in the Product categories set as include, use the search, find and select the category

    The appearance can also be fixed, but with you and I together on skype share screen. I have to go out now for a few hours though 🙁

    Anonymous
    #58086
    This reply has been marked as private.
    Trevor
    #58151

    I sent a request. There are 2 contacts with your name, I hope I have the right one.

    Anonymous
    #69763

    Hi trevor,

    I’m using the shortcode display result method. Instead of creating a fully new result.php search result, is there a way to use the woocommerce templates for this?

    Would be verry handy!

    Levi

    Trevor
    #69790

    Hi, you could use the Custom display method. It is what I use for WooCommerce pages. It allows you to use their templates. All you have to do is find where the wp_query arguments array is and add an extra argument. BUT, beware if you edit original templates, any updates overwrite these, so follow the WC guide to creating local theme versions.

    This can be done two ways, either edit the array itself, as in this post:

    https://support.searchandfilter.com/forums/topic/multiple-loops-on-one-page/#post-69010

    Or add to the array, as in this post (I have assumed the array is called $args):

    https://support.searchandfilter.com/forums/topic/double-result-page-for-single-form/#post-68063

Viewing 10 posts - 1 through 10 (of 10 total)