Show the First Post from Each of 3 Different Post Types on a Web Page?

Yes, get_posts is the safest way to use multiple loops. It does not mess up with the original query.

Another way would be to create new WP_Query objects:

$my_query = new WP_Query($args);
while ($my_query->have_posts()) : $my_query->the_post();

Note: Why you should not use query_posts()

Leave a Comment