I have two loops on my page - each with their own category. It works, but I don't know if this is the best practice as I'm pretty new to this stuff.
<?php $my_query = new WP_Query( 'category_name=news&posts_per_page=3' );
while ( $my_query->have_posts() ) : $my_query->the_post();
$do_not_duplicate[] = $post->ID; ?>
<!-- Do stuff... -->
<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>
<?php $second_query = new WP_Query( 'category_name=reviews&posts_per_page=4' );
while ( $second_query->have_posts() ) : $second_query->the_post();
$do_not_duplicate[] = $post->ID; ?>
<!-- Do stuff... -->
<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>
<!-- Do stuff... -->
was just comments that were part of the paste. this is functioning code. I'm not sure why this is off-topic, I'm new to the site and was (perhaps mistakenly) under the impression this question fit within the parameters. \$\endgroup\$ – alexwc_ Jan 9 '15 at 14:25<?php ?>
tags. everything inside of them is PHP code. \$\endgroup\$ – Malachi♦ Jan 9 '15 at 16:45