Hi @retypejonas
The save / load option will not only save the postmeta data, but will create connections from the post to the taxnomy term. This is to replicate the functionality of a taxonomy checkbox, like the post category metabox.
This however will not with with a user, only a post.
Nice work on the LIKE SQL, yes, this will be the only option for now and I’ll look into why the ID’s are saving as strings.
Thanks
E
What does ” ‘Save / Load value to post’ ” do?
I looked trough the user_meta database table and noted that the serialized array that stores term id’s wraps each ID in ” and “.
So”meta_compare, LIKE, “term-id” did the trick for now. Hopefully it will not break in the future? 😉
Hi @homax
It is possible, because ACF can save postmeta or the connection from post to term.
All you need to do is use the native WP_Query class to do any querying you wish.
There are plenty of docs on this site as to how to query custom field values.
How to query for taxonomy data? This is not ACF territory, that is why I recommend google.
Please remember ACF is only a UI interface for the native WP functionality. You are not restricted to the ACF API at all!
Thanks
E
Hi @retypejonas
I don’t believe you can use WP_User_Query for this as it is not native to add term meta to a user.
Have you selected the ‘Save / Load value to post’ option for your taxonomy field?
Perhaps you could perform a meta query instead?
Hi @kikedomingo
Perhaps you could start with teh docuemtnation. This clearly states you need to construct a $post_id parameter:
http://www.advancedcustomfields.com/resources/how-to/how-to-get-values-from-a-taxonomy-term/
Thanks
E
Hi @gongl
Thanks for the bug report.
Perhaps each language has it’s of taxonomy terms (different term_id). This would cause ACF to not work…
Is there some sort of WPML function called ‘get_translated_term_ID’ or something like that?
If so, ACF could use this function to load int he ‘current language’ term_id.
I see no issue with adding this to the core.
Thanks
E
Hi @Dmitriy
You can add ACF fields to a taxonomy. Perhaps you could start by reading the docs?
http://www.advancedcustomfields.com/resources/how-to/how-to-get-values-from-a-taxonomy-term/
P.S.
In the future, please use a descriptive title and keywords.
totally fixed it appears. Thx so much for the quick fix!
fantastic! thx I’ll check this out this morning and post back.
thx!
Nah, still not working. Same issue still exists. Advanced fields for my taxonomy not showing up.
Even if I pull out the call to the custom post type and taxonomy file and place all that code inside the child theme functions.php it doesn’t work.
This is really frustrating because it works both ways, just not at the same time.
Theme developer is on vacation too, and not offering support for some time.
I’m not sure what I need to be calling or if I need to include acf.php in a different way.
Hi @TimTee
ACF v4.2.2 is out and will fix your issue
Thanks
E
I think that if all of these are implemented it’d be important that you’d have to option to enable or disable them..
I feel like this is on the verge of becoming one of those monsters where most people wont ever use the features added and just find it annoying
I would like to add that a pending/published filter would be awesome as well. Like if you have a CPT for News, you could filter them by status, or author as well! This could be huge!!
Thanks for your reply. So I’m not nuts 😉 is it a few days for sure? Just asking as I have a deadline for middle of next week and I kinda promised this feature. I can use the multi select fields for now as it works, but it’s really kludgy in comparison. When a fix comes in a few days I can switch it. Just don’t want to do it live because this affects all the content on the front page if possible.
thx!
Hi @TimTee
Yes, this is a current bug which will be fixed in the next version of ACF.
Very sorry about the issue but you can expect a fix within the next few days,
Thanks
E
Hi @DesignSolu
I’m not exactly sure what is and isn’t working for you.
Have you attempted to debug the issue? As in, print out the variables to see where the code works and where it doesn’t?
Cheers
E
To add, after googling this I see taxonomy is an add-on? I didn’t add an add-on for this, and can’t find much documentation on this.
edit: tested this with a clean WP install, just a new ACF plugin and latest options plugin. This works fine if on a page template, but on the options page, checking a checkbox causes any custom fields on the options page to disappear.
Hi @AMEEKER
Sounds like the issue is not to do with ACF, but more of a general WP question.
I would advise you to ask this question on stack overflow and please debug your function by dumping out the returned data of these if statement functions.
Thanks
E
Updating now.
Thanks Big E! Keep up the great work.
Hey guys,
This has been fixed in 4.2.1
Thanks
E
Hi @RichB
Thanks for the screenshot.
Adding a select for the taxonomy is on the to-do and you can expect to see it soon.
ACF contains a filter which you can use to modify the WP_Query args and filter the posts. You can read more here:
http://www.advancedcustomfields.com/resources/tutorials/customize-the-relationship-field-list-query/
Thanks!
Hey guys.
This issue has been fixed and you can find the latest code on github
Thanks
E
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.