Home › Forums › Backend Issues (wp-admin) › Using Conditional Logic for a Post Category
I using custom fields for a post category. I have a radio button set up with yes and no values. I have conditional logic set up for two other fields that are set to show when the yes radio is equal to yes.
By default the no radio is selected. When I go to the post page and select the category that shows the custom fields, the no radio button is selected correctly, however the two fields that should only display if yes is selected are showing. If I check the yes radio button then the no one again they hide, but they do not hide when the category is initially selected and the custom fields load.
Anybody run into this, or have any idea on how to fix it? Thanks in advance!!
Hi @jhkerschner
Thanks for the feedback,
I’ll do some testing for the taxonomy pages and conditional logic.
I have recently done some work to the conditional logic functionality. Can you try installing the latest ACF from github and test the issue again?
Thanks
E
Hey Elliot,
I update the plugin, but the issue still exists.
Thanks,
Jared
Hi @jhkerschner
Thanks for the reminder on this one. I am unable to reproduce the error on my end. Are you able to attach some screenshots showing the field groups and their location rules, then the edit screen showing the issues?
Thanks mate.
Cheers
E
Sure thing!
This image shows the field that is set with the condition to only show when a field above it, which is a radio button is set to yes. By default the radio button is set to no.
https://www.dropbox.com/s/bim72gqmax335q9/acf1.jpg
This image shows that the filed should only be showing on posts that are part of the knowledge category.
https://www.dropbox.com/s/h5p4lxpp9h5l50k/acf2.jpg
This images shows the add new page when the knowledge category is selected. You can see that the field that is supposed to be hidden “Premium Content Downloads” is showing when no is selected.
https://www.dropbox.com/s/0xqtdfudcga6a9b/acf3.jpg
Just to note, when I go to add a new post, and select the knowledge category, then change no to yes then back to no, the field hides. It’s only on the initial page load and selection of the category that the fields that are supposed to hide don’t. I hope this makes sense, if not let me know. Thanks!
Hi @jhkerschner
Can you please download the latest files from github? I believe I have fixed this issue and would like for you to test it out!
Thanks
E
This fixed it! Thanks Elliot, Keep up the great work! I love this plugin!
The topic ‘Using Conditional Logic for a Post Category’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.