0
我想,当我使用它下面的代码只显示40子页面的10获得所有页面及其子页面的列表中的内容area..however ...Query_post()WordPress的
请让我知道如何解决它?
<ul class="subpages-pro" style="margin-top:20px;">
<span style="display:none;"><?php the_ID(); ?></span>
<?php $parent = $post->ID; ?>
<?php
query_posts('order=ASC&post_type=page&post_parent='.$parent);
while (have_posts()) : the_post();
?>
<?php $image_thumb = get_post_meta($post->ID, 'image-thumb', true); ?>
<li><?php the_post_thumbnail(); ?>
<h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
<?php the_excerpt(); ?>
</li>
<?php endwhile; ?>
</ul>
我觉得* numberposts *说法是相当老(WP 2.5和下?)。 ** posts_per_page **似乎是最新的术语。 – kjetilh 2013-02-24 23:25:27
谢谢,posts_per_page工作! – Matt 2013-02-25 04:58:03