<?php wp_list_categories(‘exclude_tree=& include=”ID de todas categorias que deseja listar”‘); ?>
Criador do tópico
shinih
(@shinih)
Tinha feito diferente
Eliminava as categorias filhas sendo q as mae ficavam dentro de um intervalo!
A sua forma e bem melhor!!!
Eu dei so uma implementada no codigo da catia para listar os posts da categoria especifica!!
<?php
if( is_single() ) {
global $post;
$categories = get_the_category();
$category = $categories[0];
} else {
$category = $wp_query->get_queried_object();
}
$parent = ($category->category_parent)? $category->category_parent :$category->cat_ID;
?>
<ul>
<?php
global $post;
$myposts = get_posts('numberposts=5&category='.$category->cat_ID.'');
foreach($myposts as $post) :
?>
<li>
<a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a>
</li>
<?php endforeach; ?>
</ul>