0
GrandParent
-Parent01
--Child
-Parent02
--Child
--Child
-Parent03
--Child
나는 임은 조부모 페이지에, 그것은 단지 부모가 아니라 자녀 IE를 돌려 보낼 때 해결책을 찾기 위해 바랍니다.
GrandParent
-Parent01
-Parent02
-Parent03
이것은 현재 가지고있는 코드이며, 조부모 페이지의 모든 부모와 하위를 생성하고 테이블에 배치합니다.
<?php $postid = get_the_ID(); ?>
<?php /* $pages = get_pages(array('child_of' =>$postid)); */
$pages = get_children(array(
'numberposts' =>30,
'post_parent' => $heading_page->post_id
));
$tCount= 0;
?>
<table align="center" width="100%"><tr>
<?php foreach ($pages as $page): ?>
<?php if($tCount % 2 == 0)
{
echo '</tr><tr>';
}?>
<td>
<div id="polaroid">
<figure>
<a href="<?php echo get_permalink($page->ID); ?>">
<?php echo get_the_post_thumbnail($page->ID, array(300,250)); ?></a>
<figcaption>
<a href="<?php echo get_permalink($page->ID); ?>"><?php echo $page- >post_title ?>
</a></figcaption>
</figure>
</div>
</td>
<?php $tCount++; endforeach; ?>
</tr></table>