Home Forums ACF PRO Show only categories in the relationship field taxonomy filter


Show only categories in the relationship field taxonomy filter

    • fw-jl

    • January 13, 2019 at 4:01 am

    I’m hoping this is a simple fix.

    Much like you can select a taxonomy type on a field of type TAXONOMY (when creating a custom field), I need to be able to select ONLY categories (not tags or other custom taxonomies) on a RELATIONSHIP field. So when an editor chooses “Select taxonomy,” only the categories appear in the dropdown.

    I’ve exhausted my search on ACF filters. Please advise.

    • fw-jl

    • January 18, 2019 at 7:22 am

    more context:

    With the relationship field, I can only choose the categories one by one, rather than just choose “categories,” as you can with a Taxonomy custom field. So, as categories change, I’d have to adjust each relationship field, and there are MANY.

    Taxonomy custom field = filter by taxonomy TYPE

    Relationship custom field = filter by taxonomy TERM

    Need the relationship custom field to filter by ALL categories (and ONLY categories, not tags) without selecting each one manually.

  • did you succeed on this issue fw-jl?

    i’m trying to do this too

    • fw-jl

    • May 4, 2019 at 10:52 pm

    Hi rhcarlosweb, unfortunately there wasn’t a solution to this. I did get an official response from ACF confirming this, but I can’t seem to find it.

    Since the client had a limited number of categories, I just selected each one of them in the “Filter by Taxonomy” field. Definitely not ideal, but it works for now.

  • I’ve been thinking about this and there could be a solution to ensure that all of the terms in a taxonomy are always included/selected for the filter. This could be done with an acf/load_field filter. Export the taxonomy field to php to get an idea of the settings for the taxonomy selections. In the filter get all of the terms in the taxonomy and populate the acf field setting with the correct values. This way, if a term is ever added to the category it will be automatically added to the list.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.