0
I would like to list within the category page.php the sub-categories of the specific page itself, I am using wp_list_categories()
and trying to pass the id with get_the_category()
, but I’m not getting any results.
<?php
$categories = get_the_category();
$id = $categories[0]->term_id;
wp_list_categories( array(
'child_of' => $id,
'show_count' => 0,
'orderby' => 'name',
'title_li' => '',
'order' => 'ASC',
'container_class' => 'menu-footer-titulo',
'hide_empty' => 0,
));
?>