echo' <table border="0"><tr><td>';
 $counter=Display_catogories($t_parent," ",0,0);
 echo' </td></tr></table>';


 echo $t_content;
 $counter=0;
 function Display_catogories($t_parent,$title,$level){
 global $counter;
 $t_numer=1;
 //echo $t_parent.' ';
 $args = array(
 'orderby' => 'name',
 'hierarchical' => '1',
 'show_count'=>1,
 'child_of' =>$t_parent
 );
 $categories = get_categories( $args );
 foreach ( $categories as $category ) {
 if($category->parent==$t_parent){
 $counter++;
 echo $title.$t_numer.' <a href="' . get_category_link( $category->term_id ) . '">'. $category->name .'('.$category->count.')</a><br>';

 if(($counter%18)==0){ echo' </td><td>'; }
 Display_catogories($category->cat_ID,"..".$title.$t_numer."-",$level++);
 $t_numer++;

 }
 }

$categories =NULL;
 return $counter;
 }

Screen Shot 2013-07-27 at 8.54.49 AM

By admin-powenko

Dr. Powen Ko is a teacher and CEO on LoopTek LLC, and like to teaching. if you need to class, please let PowenKo know, he will love to service and sharing. LoopTek web site is www.looptek.com

Leave a Reply