0
親ページのすべての子と孫を表示する必要がありますが、wp_list_pages()で指定された標準出力ではなくカスタム出力が必要です。WP_LIST_PAGES WP_QUERYを使用したカスタム出力
<?php
wp_list_pages(array(
'title_li' => '',
'child_of' => $post->ID
));
?>
は私が子供のページまで表示するように管理しますが、何の孫は、これを使用していない:
<?php
$args = array(
'post_type' => 'page',
'post_parent' => $post->ID,
'order' => 'ASC'
);
$the_query = new WP_Query($args);
?>
<?php if ($the_query->have_posts()) : ?>
<?php while ($the_query->have_posts()) : $the_query->the_post(); ?>
<li>
<a href="<?php the_permalink(); ?>" rel="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="table">
<div class="table-cell">
<span></span>
<h3><?php the_title(); ?></h3>
</div>
</div>
</a>
</li>
<?php endwhile; ?>
<?php endif; ?>
だけのオリジナルwp_list_pagesのような子ページの下の孫を表示するには、このコードを拡張する方法上の任意の提案を() ?
ありがとうございました!