Hi!
Can anybody help?
Thank you, John!
I don’t know php, unfortunatly, it seems that it must work now, but it does not…
Hi!
Try to use field type File (option “Return value = url”), and insert code of any audio player in to template, and there were url of audio file isert ACF code to display url of file get_field(‘my_file’);
Bee, I’v found plugin https://github.com/mattkeys/ACF-Conditional-Taxonomy-Rules it works with multiple select fields, it works!
Pleace help with your code?
I’ve chanched filed name and taxonomy name to save by wp, but it is not work, what is wrong?
function change_post_taxonomy_44582( $post_id ) {
// bail if no ACF data
if ( empty($_POST['acf']) ) {
return;
}
// get term id from $post_id (only 1 value is allowed, so it returns 1 value only)
$stored_sex = wp_get_post_terms($post_id, 'aptype');
// get submitted value from acf form
$posted_sex = $_POST['acf']['acf-field_5c72c3e3cfc4d'];
// get term_id for the submitted value
$term_id = get_term_by( 'name', $posted_sex, 'aptype' );
// if stored value is not equal to posted value, then update terms
if ( $stored_sex != $posted_sex ) {
wp_set_object_terms( $post_id, $term_id->term_id, 'aptype' );
}
}
add_action('acf/save_post', 'change_post_taxonomy_44582', 20);
Good evening, Beee
Do you mean mesaage by marlonleite August 19, 2016 at 10:12 pm
function my_acf_admin_head()… ?
I can not implement it, there is no comments, and I don’t understand how to use it
Or you mean another solution?
Bee, I’v found two solutions:
1) Plugin: Condition logic advanced: it works with taxonomy selected in WP (tight section) – not acf field
2) Nativ: first field taxonomy term(radio button) and we can select ONE term, then logic – if term id is > and <
But if AFC fiel is multiple selected fied it returns array of terms, what solution?
Thanks!
Hi guys!
Is there any news about conditional logic by taxonomy terms?
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.