Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

get the category wp

//get category name foolproof 
echo (!empty(get_the_category($post)) ? get_the_category($post)[0]->name : '');

 
PREVIOUS NEXT
Tagged: #category #wp
ADD COMMENT
Topic
Name
1+3 =