get parent category of current category page wordpress code example
Example: wordpress show only parent category
$args = array(
'orderby' => 'name',
'order' => 'ASC',
'parent' => 0
);
$categories = get_categories($args);
$args = array(
'orderby' => 'name',
'order' => 'ASC',
'parent' => 0
);
$categories = get_categories($args);