I have a specific category-slug.php page.
I want to display the first category "banner-ads" with only 1 post per page and then below that, display 3 posts per page from the category "featured."
I don't want to use: **query_posts( 'posts_per_page=4' );**
I've tried the pre_get_posts function but can't seem to get it working.
Right now the number of posts per page that's displaying is the number I assigned in Settings->Reading
Here's my current code:
$args1 = array(
'category_name' => 'banner-ads',
'posts_per_page' => 1
);
$the_query = new WP_Query( $args1 );
while ( $the_query->have_posts() ) :
$the_query->the_post();
ar2_render_posts( null, array ( 'type' => 'node' ), true );
endwhile;
wp_reset_postdata();
$args2 = array(
'category_name' => 'featured',
'posts_per_page' => 3
);
$query2 = new WP_Query( $args2 );
while( $query2->have_posts() ):
$query2->next_post();
ar2_render_posts( null, array ( 'type' => 'traditional' ), true );
endwhile;
wp_reset_postdata();