In the_loop
, just add this code…
<?php
$cats = wp_get_object_terms(get_the_id(), 'category');
?>
Print_r $cats
, it will have the list of the categories
applied to this post.
In the_loop
, just add this code…
<?php
$cats = wp_get_object_terms(get_the_id(), 'category');
?>
Print_r $cats
, it will have the list of the categories
applied to this post.