I'm trying to create a custom category template that will display a list of the current category's child categories. Besides the name and link to the category I also want to add a thumbnail and the category description. I tried the following code but it didn't return anything:
<?php
$catid = get_category(get_query_var( 'cat' ));
$termchildren = get_term_children( $catid, 'category' );
echo '<ul>';
foreach( $termchildren as $cat ) {
$term = get_term_by( 'id', '$cat', 'category' );
echo '<li>'.$term->name.'</li>';
}
?>
I've left out the other parts of the html list at this stage as I'm just trying to get it to work and will add them in later.