• Resolved fiona92

    (@fiona92)


    Hello, I just wanted to find out please if it is possible to filter by advnacned custom fields.
    Thank you

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author annastaa

    (@annastaa)

    Hello Fiona92,

    Are you referring to the fields created with the help of the Advanced Custom Fields plugin?

    I have just run a test with their 2 most basic field types, the text and the number, and at least these 2 types seem to engage the standard WordPress meta data mechanism. This means that you can create a Product Meta Data Filter out of ACF fields associated with the “Product” post type. To connect your meta data filter to the needed advanced custom field, enter the ACF Field Name as the filter’s Meta data name.

    Thread Starter fiona92

    (@fiona92)

    Thank you, and is the above possible with the free version?

    Plugin Author annastaa

    (@annastaa)

    Hello again Fiona92,

    Yes, you can create Product Meta Data filters in the free version of annasta Filters.

    Thread Starter fiona92

    (@fiona92)

    Thank you so much, it is working on some but not all.

    I’ve added a Meta data name filter which under ACF has 10 option but in Annastaa filter it only shows 2 options.

    ACF field choices: https://ibb.co/0tDnLLP

    Annastaa filter: https://ibb.co/Gn7ymhj

    Page filter display: https://ibb.co/JvQ7SKr

    Filter settings: https://ibb.co/KW0rk9w

    Thank you

    Plugin Author annastaa

    (@annastaa)

    Dear Fiona92,

    As for the “Choices” fields group of Advanced Custom Fields plugin, it seems to be the matter of format in which ACF saves the product meta data. The meta data filters of our plugin support Latin text or numeric meta data. Moreover, the metadata values are not allowed to have spaces. ACF seems to save some of its field types as arrays (for example, in case of a checkbox field), so it’s not possible to create filter out of them.

    In case you are interested in single-value product meta data, the Select and Radio button field types from the Choice fields group seem to work, with some limitations. To bypass the limitation of filters’ meta data values not being allowed to have spaces, the ACF Choices can be entered like so:

    excellent : Excellent
    good : Good
    bad : Bad
    very_bad : Very bad

    Problem is, the filters will auto-generate terms’ labels based on their meta data value, and you will get the following list of filter terms when using the above choices:

    excellent
    good
    bad
    very_bad

    This limitation can only be bypassed by assigning custom labels with the help of the Custom term icons and labels premium filter style.

    As for some meta data values missing from your filter’s options list, please keep in mind that our plugin scans the meta data assignment to actual products. Meta data values that are not associated with any product will not be displayed!

    Also, please keep in mind to re-save (push the Update button) your products each time you need to change your ACF fields type. Whenever you change/ assign new meta data values to your products, save or reload your filtering preset to refresh the meta data filters’ options list.

    Thread Starter fiona92

    (@fiona92)

    Thank you, It seems that the book condition ACF filters are working, showing and filtering.

    The other ACF filter, Authors, are not displaying results when filtering.

    For example, book https://ibb.co/KKLLVYG has an author filled in and when filtered it is showing the result: https://ibb.co/jz1h0yd

    But any other author is not displaying. For example this book also has an author https://ibb.co/wRqvFPw but when filtered it shows no matching products https://ibb.co/tKRHfm1

    I have the filters in Annasta set up the same way.

    Thank you

    Plugin Author annastaa

    (@annastaa)

    Fiona92,

    Your authors (apart from Mickey ?? ) have spaces between author name and surname. These spaces become part of meta data values, and spaces are not allowed in meta data values for the filters to function properly. Please read the part of my previous post that describes the ACF mechanism of assigning meta data values (the excellent : Excellent etc. example and forward). You could replace spaces with dashes or underscores.

    Thread Starter fiona92

    (@fiona92)

    Thank you for the feedback. I’ve added them like this but still not reading:
    https://ibb.co/3BfnYms

    Thread Starter fiona92

    (@fiona92)

    It works fine now, thanks

    Plugin Author annastaa

    (@annastaa)

    Great Fiona92,

    Please let us know if there’s anything else that we could look into in connection with ACF compatibility!

    Thread Starter fiona92

    (@fiona92)

    thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Filter by Advanced custom fields’ is closed to new replies.