How to get category ids attached to a post?
What’s the best way to get all category ids that are attached to a single post?
Been playing around with
wp_get_post_terms(), but just wondering if there is a simpler way that some of you plugin gurus know about?
Just found out they can be accessed like this:
var_dump( $wp_object_cache->cache[ 'category' ] ); var_dump( $wp_object_cache->cache[ 'post_tag' ] );
- The topic ‘How to get category ids attached to a post?’ is closed to new replies.