Get post category by id in wordpress

Posted: January 12, 2015 in All Category, WordPress

$category = get_the_term_list($postid, 'property_category', '', ', ', '');

if ( $category == '' ){

$category=get_the_category_list(', ',$postid);

}

Advertisements

Comments are closed.