Support Forums

Looking for support? You can access the support system via your account.

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

Viewing 10 posts - 1 through 10 (of 12 total)
  • EnsinE
    #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 Moderator
    #221435
    This reply has been marked as private.
    EnsinE
    #221524
    This reply has been marked as private.
    Trevor Moderator
    #221629
    This reply has been marked as private.
    EnsinE
    #221702
    This reply has been marked as private.
    Trevor Moderator
    #221768
    This reply has been marked as private.
    EnsinE
    #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 Moderator
    #221999
    This reply has been marked as private.
    EnsinE
    #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 Moderator
    #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)

The topic ‘Searching for Products with ACF fields (0 results)’ is closed to new replies.