Tag Info

Hot answers tagged

2

This maybe old, and possibly even at the time of the original question not available but.. If you look in wp-includes/taxonomy.php there is a show_in_menu option for the register_taxonomy() hook that was left out of WordPress's documentation. show_in_menu - Whether to show the taxonomy in the admin menu. If true, the taxonomy is shown as a submenu of ...


1

You can use the parent argument in get_terms() to get direct children of a term. You can use the child_of argument to get all descendents of a term. Something like this. $parent_id = 32; $args = array( 'parent' => $parent_id ); $terms = get_terms( $taxonomy, $args ); print_r( $terms ); If you want to programmatically get parent terms and within ...


1

With the below, you are grabbing terms from the event_category taxonomy Note that you are always grabbing the same terms though. $terms = get_terms( 'event_category', array( 'orderby' => 'count', 'hide_empty' => true ) ); If you want to grab only from the current pages children, then you should grab the current term ...



Only top voted, non community-wiki answers of a minimum length are eligible