그래서 홈 페이지에있는 모든 페이지 (게시물이 아님)를 표시하는 루프가 있습니다. 단일 부모 페이지의 자식 만 표시하도록 루프를 수정하고 싶습니다 (참조 용 페이지 번호는 116입니다). 이렇게하려면 아래 코드를 어떻게 수정해야합니까? 홈 페이지에 하나의 상위 페이지 하위 항목 표시 (Wordpress)
<?php query_posts('post_type=page&posts_per_page=-1'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink() ?>"
rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
<div>
<?php echo get_the_post_thumbnail($page->ID, 'thumbnail'); ?>
<div ><?php the_title(); ?>
</div> <!-- headlines-title -->
</div></a>
<?php endwhile; endif; ?>
또한 당신의 페이지 ID이
<?php query_posts('static=true&child_limit=10&child_of='.$id.'&order=ASC'); ?>
<?php if(have_posts()) : while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink();?>"><?php the_title();?>:</a><?php the_excerpt(); ? >
<?php endwhile; endif; ?>
$ id를 시도 ... 손자를 표시하는도 OK입니다
NT 페이지 ID가 있으며 페이지가 전혀 표시되지 않았습니다. – user1631884
죄송합니다. http://wordpress.org/extend/plugins/pjw-query-child-of/ – Hareesh
플러그인을 설치해야 플러그인을 설치할 필요가 없습니다. 그래도 도움을 주셔서 감사합니다. – user1631884