I'm triying to get the category name by the category slug. To be more precise: I'm creating a new shortcode where I ask for the category slug and add that to the query args.. On top of the result I want to display the category name.
For testing I replace the variable with a known slug.
This example returns a NULL
$catObj = get_category_by_slug('salads-entrees');
var_dump($catObj->name);