0

I'm trying to create a big filter for shop page and can't find anything about this.

I created some meta fields for product data inside general by hooking inside woocommerce_product_options_general_product_data.

So for example, I created 2 select meta fields:

1) with two options, let's call it A and B;

2) with two options, let's call it X and Y;

Now what I want, when user go to my shop page, he will see 2 dropdowns, choose, for example, in first dropdown A and in the second X then click button "search" and get all products, which has these metas.

Is it possible? I can't find anything, maybe I'm googling stupidly.

I even tried to find ready plugins, But all I've found is ajax filter plugins, but that's not what I want.

Sorry for my English, thanks in advance!

2
  • Generally the way to do this in WooCommerce is to use product attributes and the built in filter widgets. Commented May 19, 2020 at 1:44
  • @JacobPeattie what about meta fields like numbers, checkboxes? can they be filtered by attributes properly?
    – Aslan
    Commented May 19, 2020 at 8:03

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.