web_sakat adlı üyeden alıntı: mesajı görüntüle
arkadaşlar alt kategorileri
                    if (is_category()) {
                $this_category = get_category($cat);
                    if (get_category_children($this_category->cat_ID) != "") {

                    echo "<ul>";
                    
                wp_list_categories('orderby=name&show_count=0&hide_empty=0&title_li=&use_desc_for_title=1&child_of='.$this_category->cat_ID);

                    echo "</ul>";
                }
                }
bu şekilde gösteriyorum... fakat alt kategori var yada yok döngüsünü kuramadım eğer alt kategori yoksa ekrana bişi yazdırmicam...

bu şekilde kullandığımda alt kategoriye girdiğimdede alt kategori varmış gibi tablo çıkıyor ama bişi basamıyor ekrana olmadığı için...
                    if (is_category()) {
                $this_category = get_category($cat);
                    if (get_category_children($this_category->cat_ID) != "") {

                    echo "<ul>";
                    
                wp_list_categories('orderby=name&show_count=0&hide_empty=0&title_li=&use_desc_for_title=1&child_of='.$this_category->cat_ID);

                    echo "</ul>";
                }
                }
buraya kadar yazıp burda tıkanmanız biraz dinlenmeniz gerekiği anlamına geliyor.

<?php
if (is_category()) {
    $this_category = get_category($cat);
        
        if (get_category_children($this_category->cat_ID) != "") {
            echo "<ul>";
                wp_list_categories('orderby=name&show_count=0&hide_empty=0&title_li=&use_desc_for_title=1&child_of='.$this_category->cat_ID);
            echo "</ul>";
        } else {
            echo 'alt kategori yok';
        }
}
?>
else yeteli olacaktır.