wordpress single post get category name

39

wordpress single post get category name -

$category = get_the_category();
$firstCategory = $category[0]->cat_name;

Comments

Submit
0 Comments