Take the tour ×  I have three custom post type:    • books   •
magazine   • videos  Now i want to limit the number of post for
custom post type, for example:    • books => 3 post   • magazine
=> 2 post   • videos => 1 post  I used a query post like this:
query_posts( array(     'post_type' => array( 'paged' => $paged,
'posts_per_page' => 6,  $counter = 1; if (have_posts()) :
while (have_posts()) : the_post();   if (($counter == 2) ||
($counter == 3) || ($counter == 4)) {         $div = 'alpha';
} elseif(($counter == 6)) {         $div = 'omega';     } else {
$div = '';  The problems is i cant limit the numbers by custom
post type. Any idea?  Thank you :)  share|improve this question
add comment  2 Answers  You can do this by merging queries:  $q1
= get_posts(array(     'post_type' => 'books',
'posts_per_page' => 3  $q2 = get_posts(array(     'post_type' =>
'magazines',     'posts_per_page' => 2  $q3 = get_posts(array(
'post_type' => 'videos',     'posts_per_page' => 1  $merged =
array