Using ‘query_posts’ to list ‘child_of’ and can’t limit number of posts
-
Hi,
I am using a plug-in that created an argument ‘child-of’ to list child of a page.
I am using a query_post to get those children and its all good but it doesn’t catch the ‘posts_per_page=’ or ‘showposts=’ arguments. It keeps on displaying all of the subpages. I tried setting my global post per page limit lower but it doesn’t affect this query. Here’s the code i am using to query my posts and display them:
<?php query_posts('static=true&child_of=19&posts_per_page=3&orderby=menu_order&order=ASC'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="derniere" id="post-<?php the_ID(); ?>"> <!-- thumbnail wrapper --> <div class="thumb main"> <!-- 235150image-covers --> <?php $image = get_post_meta($post->ID, 'thumbnail', true); ?> <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><img src="<?php echo $image; ?>" alt="" /></a> <!-- 235150image end --> <!-- thumbanil title --> <div class="thumb-title"> <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title() ?></a></h2> </div> <!-- thumbanil title end --> </div></div> <?php endwhile; ?><?php endif; ?>
If someone has an idea what i could do to limit those posts, I would be jumping up and down like a pogo!
cheers,
Brian
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Using ‘query_posts’ to list ‘child_of’ and can’t limit number of posts’ is closed to new replies.