Support Forums

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

Forums Forums Search & Filter Pro Having trouble limiting search by ACF field

Viewing 10 posts - 1 through 10 (of 18 total)
  • Jonathan D. Schroeder
    #193546

    So, I have filters happening on a custom taxonomy archive for a custom post type, and it works fine and is pulling in everything without an issue.

    Here’s a link to where this is working:
    https://www.geoart.com/schematic-categories/onshore/

    I’d like to remove the filter for “Licensable” in the right sidebar and just limit the output of this to the things that actually are licensable instead.

    The ACF fields which holds that information is called perez_licensable and it’s boolean. I’d like to *only* show the posts for which perez_licensable is true (I don’t want users to even see that there’s even an option to see the ones that for which “perez_licensable” is not true).

    On the search form editor, under Post Meta (where it says “Only return results which match specific post meta data.”), I select that custom field, and then there’s a selection for “char,” “numeric,” and a few other options. I’ve tried selecting “char” and setting the value to “true” or selecting “numeric” and setting it to “1” but it doesn’t seem to work properly. (I’ve tried leaving the filter for the same post meta in place, and I’ve also tried removing it).

    Can you help me figure out what I’m doing wrong? The main issue I seem to be having (I think) is that the variable is boolean, and there’s no option to use that field as if it’s boolean.

    Trevor Moderator
    #193553
    This reply has been marked as private.
    Jonathan D. Schroeder
    #193625
    This reply has been marked as private.
    Trevor Moderator
    #193642
    This reply has been marked as private.
    Jonathan D. Schroeder
    #193661

    Yes, I think probably all of them do. That archive handles several different content types. I don’t think there are any others of the same CPT using that template.

    Trevor Moderator
    #193663

    That is a potential problem, as the different forms will conflict with each other.

    Jonathan D. Schroeder
    #193665

    Filtering by that post meta works fine in the sidebar. I’d be fine with simply showing the posts where that particular post meta is false and then hiding that filter. Is it possible to set a default value that way?

    Jonathan D. Schroeder
    #193667

    I should also point out — this is the only case where the archive is a taxonomy term. In all other cases it’s a CPT. I don’t understand why there’s a conflict, but that’s ok.

    Trevor Moderator
    #193669

    So, in the form you have licensable with option true and false.

    You want to fix this to true only?

    Jonathan D. Schroeder
    #193671

    Yeah, that would be perfect!

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

The topic ‘Having trouble limiting search by ACF field’ is closed to new replies.