Display x number of terms and exclude hidden

Googling get_terms gives the WP developer hub page for get_terms as the first result, for which the first example is this: $terms = get_terms( ‘post_tag’, array( ‘hide_empty’ => false, ) ); Using this as a basis we get: $args = array( ‘taxonomy’ => ‘product_cat’, ‘number’ => 5, ‘orderby’ => ‘name’, ‘parent’ => 11, ‘hide_empty’ => … Read more

Getting a sub category based on a category name

If you want to get all the descendents for the volume category and its ID is lets say 5: $categories = get_categories( array( ‘child_of’ => 5 )); foreach($categories as $category) { echo ‘<p>Category: <a href=”‘ . get_category_link( $category->term_id ) . ‘” title=”‘ . sprintf( __( “View all posts in %s” ), $category->name ) . ‘” … Read more

Unable to retrieve any child terms using get_terms

Try relying on the new WP_Term_Query() class, here’s an example per your code: // WP_Term_Query arguments $args = array( ‘taxonomy’ => ‘carabana_Cat’, ‘hide_empty’ => false, ‘orderby’ => ‘description’, ‘child_of’ => 28) ); // The Term Query $term_query = new WP_Term_Query( $args );