Admin only taxonomies?

When registering the taxonomy just set public to false, and it’ won’t be accessible on the front end. Just make sure to specify show_ui to true, otherwise it will use the public value and be hidden. register_taxonomy( ‘my_taxonomy’, ‘product’, [ ‘public’ => false, ‘show_ui’ => true, ] ); If you’re registering the taxonomy with a … Read more

Get children of taxonomies

not actually sure what you are trying to achieve with the code. I would write something like this to get the child terms $terms = get_terms([ ‘taxonomy’ => array(‘Movies, Musics, Books, Games’), ‘parent’ => 0, ‘hide_empty’ => false, ]); if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) { foreach ($terms as … Read more

display taxonomy terms with link

You’ll need to use get_term_link(), e.g. change your $terms array to be HTML for the terms or links instead: foreach( $taxonomy_terms as $term ) { $term_link = get_term_link( $term->slug, $taxonomy ); if (! is_wp_error( $term_link ) ) { $terms[] = ‘<a href=”‘ . esc_url( $term_link ) . ‘”>’ . esc_html( $term->name ) . ‘</a>’; } … Read more