Can't get categories assigned to a custom post type
-
I’m using Zoomfolio plugin and this creates a Portfolio custom post type. I’ve added portfolio posts and assigned portfolio categories but I can’t seem to echo the assigned categories when on the single portfolio post view.
I’ve tried various things and they all return empty results. I’m echoing the post ID so I know that exists and I’ve tried inside and outside the loop.
$post_categories = wp_get_post_categories($post->ID);
$terms = wp_get_post_terms($post->ID,’dzs_portfolio’);How can I best debug the problem? Is there a way I can echo all the data for a post to check it has the categories assigned? Thanks,
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Can't get categories assigned to a custom post type’ is closed to new replies.