Display the category name of a post that is in two different categories

This should get you going in the right direction. echo ‘<div class=”testata_inner”>’; $cat = get_the_category($recent[“ID”]); //get the category array if ($cat[0]->name != “Featured”) { //check if the category is “featured” $catname = $cat[0]->name; //set $catname variable to “featured” } else { $catname = $cat[1]->name; //or set $catname variable to “other category name” } echo ‘<span … Read more

How to show “category” name?

This might help you to get categories of particular post $catList =get_the_category($post->ID); foreach($catList as $single){ echo $single->cat_name; } You can also check from below links get_the_category get-category-name-from-post-id

Add advertising box to a specific category page

Just a note to potential downvoters and close voters, even though this question by itself is on topic, the reason that this being a core theme, make this even more on topic EDIT As you are making use of the twentyfourteen theme, you have to remember this one golden rule ( and this applies to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)