How to get the current category with custom posts
The good basic technique to go from specifics to more general context is to look at the calls you already have. You already call single_cat_title(), which somehow knows current category, right? If you look inside you will see it passes call to single_term_title(). And how does that one in turn knows? $term = get_queried_object(); So … Read more