<?
$cat = single_cat_title('',true);
$cat_id = get_cat_ID($cat);
wp_list_categories('child_of=$cat_id');
?>
just tried it and it didn’t work 🙁
change the first line with $cat = single_cat_title('',false);
@jamesmddd
is it working? If your issue is solved plz mark it as resolved.
Thanks
C
No, still not working…
Maybe if I show you the page its going on you can know what I’m talking about…
http://designermensclothes.co.uk/22/mensclothes/accessories
underneath the Category: Accessories title, I’d like to display the child categories of Accessories, which are linked to the child category page.;
have a child category for accessories? this code is working for me. Why not working it? Check once again. Also see the Codex
<?
$cat = single_cat_title('',false);
$cat_id = get_cat_ID($cat);
wp_list_categories('child_of='.$cat_id);
?>
ahah its working, thanks!
do you know if there is any way I can get the child categories to be in a line, rather than in a bullet point list?
write a css. like
.childcat li{
display: inline;
list-style-type: none;
padding-right: 10px;
}