Inserir get_page_children no loop
-
Olá Pessoal estou com uma dúvida na estrutura de loop abaixo, ela exibe o post conforme os parâmetros que são passados para $q.
Funciona bem, tudo aparece, porém gostaria que o loop mostrasse apenas as sub-páginas de uma página mãe que eu determinasse. Para isso tentei usar get_page_children mas não consegui.<?php
$q = new WP_Query(array(‘ignore_sticky_posts’ => 1,’post_type’=>$page, ‘posts_per_page’=>$number, ‘orderby’=>$sortby));
?><?php while ($q->have_posts()) : $q->the_post(); ?>
<?php the_permalink() ?><?php the_title(); ?>
<?php the_content(); ?>
<?php endwhile; else: ?>
<?php endwhile; ?>Alguém tem alguma ideia?
- O tópico ‘Inserir get_page_children no loop’ está fechado a novas respostas.