for 2 bloody days i have tried and i cant do this. *sob*sob*
basically i want to create the categories tag on separate li tags so that i can style them with jquery/html. but how do i do that???
this is my code (it displays all categories)
$counter++;wp_list_categories('hide_empty=0&title_li=')
now in order for each category to use a separate li, I assume that I need each category on a separate line and as such I cant use the above code (coz all categories are displayed together). So I used the “include” statement as such
wp_list_categories('include=3&hide_empty=0&title_li=');
I though this will display parent category 3 and its children automatically, but no, it only displays the stupid parent category ‘3’. But if I manually add the children, it works like so
wp_list_categories('include=3,10,11&hide_empty=0&title_li=');
in the above cat_id 10 and 11 are the children so everything is displayed correctly as
PARENT CATEGORY
>>CHILD 1
>>CHILD2
But I do not want to do anything manually, because what happens in the case that there are 100 children? I’m not gonna freakin manually add them all!!!
All I wanna achieve is this
Oh yea, I have even tried this to no avail:
<?php
$criteria .= wp_list_categories('include=3’;
foreach ($sqls as $sql1){
$abc= $sql1->term_id;
$criteria .=.','. $abc;}
$criteria .='&hide_empty=0&hierarchical=1&title_li=');
echo $criteria?>
basically i want to create the categories tag on separate li tags so that i can style them with jquery/html. but how do i do that???
this is my code (it displays all categories)
$counter++;wp_list_categories('hide_empty=0&title_li=')
now in order for each category to use a separate li, I assume that I need each category on a separate line and as such I cant use the above code (coz all categories are displayed together). So I used the “include” statement as such
wp_list_categories('include=3&hide_empty=0&title_li=');
I though this will display parent category 3 and its children automatically, but no, it only displays the stupid parent category ‘3’. But if I manually add the children, it works like so
wp_list_categories('include=3,10,11&hide_empty=0&title_li=');
in the above cat_id 10 and 11 are the children so everything is displayed correctly as
PARENT CATEGORY
>>CHILD 1
>>CHILD2
But I do not want to do anything manually, because what happens in the case that there are 100 children? I’m not gonna freakin manually add them all!!!
All I wanna achieve is this

Oh yea, I have even tried this to no avail:
<?php
$criteria .= wp_list_categories('include=3’;
foreach ($sqls as $sql1){
$abc= $sql1->term_id;
$criteria .=.','. $abc;}
$criteria .='&hide_empty=0&hierarchical=1&title_li=');
echo $criteria?>