Quantcast
Viewing all articles
Browse latest Browse all 20145

Reply To: [Assigned] PHP code to output Post category

Hi Paul,

I assume we are talking about a custom taxonomy "property-category", please try use WP function get_the_terms:
Retrieve the terms of the taxonomy that are attached to the post.
http://codex.wordpress.org/Function_Reference/get_the_terms

For example:

...
$terms = get_the_terms( $post_id, 'property-category' );
if($terms)
{
$title .= ' ' . implode(",", $terms);
}
...

Please let me know if you need assistance to do it

Regards
Luo


Viewing all articles
Browse latest Browse all 20145

Trending Articles