I need show the ID of the category in a post. I used to show it in this way:
$postid=$post->ID; $categoriapost=$wpdb->get_var("SELECT category_id FROM wp_post2cat WHERE post_id=$postid");
But it doesn't work in the last verion of WP, how can I show it?
Thanks in advanced!