Home › Forums › Backend Issues (wp-admin) › Attachment taxonomy textfield › Reply To: Attachment taxonomy textfield
Hello Elliot
Here is my code from the function.php
function create_taxonomies() {
// Add new taxonomy, make it hierarchical (like categories)
$labels = array(
‘name’ => __( ‘Tøjer’ ),
‘singular_name’ => __( ‘Tøj’ ),
);
$args = array(
‘hierarchical’ => true,
‘labels’ => $labels,
‘show_ui’ => true,
‘show_admin_column’ => true,
‘query_var’ => true,
‘rewrite’ => array( ‘slug’ => ‘toj’ ),
);
register_taxonomy( ‘toj’, array( ‘attachment’ ), $args );
}
And an image how it looks in media tab and an image how it looks i the gallery edit media popup
Hope it helps
Thanks
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.