Difference between get_category, get_term_by and get_categories
To fully understand the difference between get_categories(), get_category() and get_term_by(), you need to have a look at how these functions are constructed. get_categories($args) as its name suggest, get a list of all categories created on the site. This function can be found in “wp-includes/category.php” lines 39 to 66 39 function get_categories( $args = ” ) { 40 $defaults = array( ‘taxonomy’ => ‘category’ ); … Read more