estou apanhando um pouco para customizar uma lista de paginas onde, segue da seguinte maneira:
PRODUTO
-PRODUTO 01 (pagina)
--PRODUTO 01a (sub-pagina)
--PRODUTO 01b (sub-pagina)
--PRODUTO 01c (sub-pagina)
-PRODUTO 02 (pagina)
--PRODUTO 02a (sub-pagina)
--PRODUTO 02b (sub-pagina)
--PRODUTO 02c (sub-pagina)
... assim em diante...
o que pretendo fazer eh listar as paginas dentro de DIV e sub-paginas em Listas..
eis o codigo ate agora (mostra o menu tudo em lista por enquanto)
<?php
if(!$post->post_parent){
// will display the subpages of this top level page
$children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
}else{
// diplays only the subpages of parent level
//$children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
if($post->ancestors)
{
// now you can get the the top ID of this page
// wp is putting the ids DESC, thats why the top level ID is the last one
$ancestors = end($post->ancestors);
$children = wp_list_pages("title_li=&child_of=".$ancestors."&echo=0");
// you will always get the whole subpages list
}
}
if ($children) { ?>
<ul id="produtos">
<?php echo $children; ?>
</ul>
<?php } ?>
o exemplo se encontra aqui: http://www.assessortec.com/wp/?page_id=7
obrigado!