Home › Forums › General Issues › Taxonomy term meta › Reply To: Taxonomy term meta
I don’t, I I were going to do this I would do something like
add_action('init', 'filters_for_acf_term_meta');
function filters_for_acf_term_meta() {
$acf_version = acf_get_setting('version');
if( version_compare($acf_version, '5.5.0, '>=') ) {
// 5.5 uses term meta, don't need the filters
return;
}
// add filters and functions to deal with term meta
// you can create more than one here and they
// will only be loaded if ACF <5.5
add_action('acf/save_post', 'convert_options_to_term_meta');
function convert_options_to_term_meta($post_id) {
// use examples from
// https://support.advancedcustomfields.com/forums/topic/how-to-use-wp-term-meta-on-acf-the-easy-way/
// to build actions
} // end function convert_options_to_term_meta
} // end function filters_for_acf_term_meta
The code was edited to correct error
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’re reaching out to our multilingual users to ask for help in translating ACF 6.1. Help make sure the latest features are available in your language here: https://t.co/TkEc2Exd6U
— Advanced Custom Fields (@wp_acf) May 22, 2023
© 2023 Advanced Custom Fields.
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.