Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

get current post category id wordpress

global $wp_query;
$postcat = get_the_category( $wp_query->post->ID );
 
PREVIOUS NEXT
Tagged: #current #post #category #id #wordpress
ADD COMMENT
Topic
Name
3+7 =