
Ben bu bölümde alt kategorilerin değil son5 yada rastgele 5 postun görünmesini nasıl sağlayabilirim. Şimdiden teşekkürler.
<div id="frontpage_cats">
<?php
$categories = get_categories('hide_empty=0&hierarchical=0&parent=0&exclude='.get_option('wpClassifieds_blog_cat'));
$i = 0;
$q = count($categories);
$z = round($q/3);
foreach ($categories as $key => $category){
if ($i==0 or $i==$z) {
echo '<div class="cats_col1 cats_colums">';
}
elseif ($i==($z*2)) {
echo '<div class="cats_col2 cats_colums">';
}
echo '<ul><li class="cathead"><a href="'.get_category_region_link($category->cat_ID).'">'.$category->name.'</a></li>';
echo wp_list_categories_region('echo=0&title_li=&orderby=name&show_count=0&use_desc_for_title=0&hide_empty=0&depth=1&child_of='.$category->cat_ID);
echo '</ul>';
if ($i==($z-1) or $i==(($z*2)-1) or $i==($q-1)) {
echo '</div>';
}
$i++;
}
?>
</div>Kod budur ilgilenen arkadaşlara teşekkürler.