mateusneves
6/14/2016 - 2:01 AM

Get current category parent ID

Get current category parent ID

$category = get_the_category();
$parent_cat = $category->category_parent;