I’m building my own nav menu using custom taxonomies and the get_categories() method and I notice when I’m trying to pull my link for the category I can choose between cat_id and term_id. Is there a difference between the two? Which one should I be using?
Here’s an example of my code using the term_id
foreach ($subcategories as $subcategory) {
$output .= '<li><a href="'. get_category_link($subcategory->term_id) .'">' . $subcategory->name . "</a></li>\n";
}
The two mean the same. Term_id is the actual field name in the wp_terms database table, cat_id is a frontend abbreviation, perhaps more easily understood by those working from the front end only.