I would like to list the subcategories of the page itself, I am using wp_list_categories()
and trying to pass the id with get_the_category()
, but I am not having 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,
));
?>