Home › Forums › ACF PRO › Choose wordpress tags shown in ACF field taxonomy (= do not show every term) › Reply To: Choose wordpress tags shown in ACF field taxonomy (= do not show every term)
Hello John,
thanks for your link!
As a PHP beginner, I tried to use the code mentioned in the link in my theme’s function.php like this:
function my_taxonomy_query( $args, $field, $post_id ) {
// modify args
$args['orderby'] = 'count';
$args['order'] = 'ASC';
// return
return $args;
}
add_filter('acf/fields/taxonomy/query/name={$ti_tag_test}', 'my_taxonomy_query', 10, 3);
At least I assume it’s for the theme’s functions.php. I also assume that the numbers 10 and 3 are for the tag IDs? I tried every variation for the name= – with and without {} and $, but it always shows every tag available in the post editor. Or is it not something so easy to implement?
Yep, newbie here, sorry!
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.