Forums Forums Search & Filter Pro Searching for Products with ACF fields (0 results)

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

    I have created a few select fields inside Woocommerce products using ACF.
    Then I built a Search Form using Post Meta fields with choice inputs for each ACF field – Auto Count enabled.
    Now when I try to filter the products, it only shows (0) results on every ACF field available.
    What am I doing wrong?

    Trevor
    #221435
    This reply has been marked as private.
    Anonymous
    #221524
    This reply has been marked as private.
    Trevor
    #221629
    This reply has been marked as private.
    Anonymous
    #221702
    This reply has been marked as private.
    Trevor
    #221768
    This reply has been marked as private.
    Anonymous
    #221905

    Hey, I have found the problem but I couldn’t find a solution.

    Some options were showing (0) results because they are VARIABLE PRODUCTS. So I checked to search Products and Variations on post types and it solved for Categories, but not ACF Fields.

    Variable products can’t be filtered because the ACF field is in the product, not in the variation, and I can’t display the custom fields inside a veriation – this rule doesn’t exist in ACF.

    Is there some way to use the custom fields in the product which the variation belongs to? It’s the only way it would work for me.

    Thanks!

    Trevor
    #221999
    This reply has been marked as private.
    Anonymous
    #222050

    Yes, it works now! Thank you!

    Just one more thing. Is it possible to have two Search Forms using the Display results method WooCommerce Shop? I haven’t tried it yet, but there was an error alert when I created two forms with this display method. I won’t be using them together, they will be in different pages.

    Trevor
    #222052

    It is not possible, sorry. You must make one form with all fields that you need, and if, on certain pages, some fields are not needed, use custom CSS on those pages to hide the field(s). For example, every category page has the category name in the body tag class names that makes this possible.

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