Split Woocommerce Site

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 4 days, 19 hours ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #38622
    TKS
    TKS
    Participant

    Hi,

    Our Woocommerce website is split into 2 – Shooting & Fishing.
    We want to be able to limit the search on Shooting to only search through Shooting categories and on Fishing only search through Fishing categories, also to have different result pages so we can apply the correct filters on the page.
    Is this possible ?
    Many thanks

    #38638
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    For the live results, this knowledge bease should help.
    That is a generic solution for when you have multiple categories.

    Having multiple results pages is a bit more complicated, WordPress does not have that feature. You can sort of hack your way around it, either by using the plugin search results shortcode as the custom results page, or using an elementor products widget.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #38700
    TKS
    TKS
    Participant

    Hi Ernest,

    Apologies for the slow reply, your email went into junk and we have only just found it.
    So for limiting the search you recommend adding code to the functions.php which is fine but we need to know exactly what to add/change –
    add_action(‘asp_layout_in_form’, ‘asp_layout_in_form_archive_input’, 10);
    function asp_layout_in_form_archive_input() {
    $taxonomies = ‘category, post_tag, product_cat’; // Enter the taxonomy names here
    We will have two searches so which part do we change to point at the right one ? how are product categories to be separated – air guns, targets, < – is that correct ?

    We are using Elementor Pro as requested by the client, we have two separate headers , two different searches that will be split. We have spent alot of time going through your documentation, but we still cannot work out how to point one search result to one Elementor search page (i.e. fishing and the other shooting)

    Hope that makes sense
    Thanks
    Ross

    #38713
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Ross,

    I’m afraid no, no change is needed on that code. If you are using WooCommerce, then it will automatically do it’s thing on the taxonomy archive page. Note, that that works for archive pages with the live results (not elementor results).

    Might be a bit more simpler to just create two search bars, configure each to return results from that specific category only. Then you can create two elementor pages for the results – one for each search bar.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


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

You must be logged in to reply to this topic.