Get current category parent ID
$category = get_the_category(); $parent_cat = $category->category_parent;