07-27-2023, 12:10 AM
Tried above for solutions to find cat ID of a post, but nothing worked, used the following instead:
$obj = get_queried_object();
$c_id = wp_get_post_categories($obj->ID);
$obj = get_queried_object();
$c_id = wp_get_post_categories($obj->ID);