Reputation: 589
Ok, I am having a very strange issue. Look at the code, it is quite self-explanatory. It throws an infinite loop, and I am not sure why.
<?php
//Only display 3 posts in the loop
$args = array(
'posts_per_page' => '3',
);
frontpage_query = new WP_Query( $args );
if ( $frontpage_query->have_posts() ) : while ( have_posts() ) : $frontpage_query->the_post(); ?>
<?php get_template_part( 'parts/loop', 'frontpage-grid' ); ?>
<?php endwhile; endif; ?>
Upvotes: 0
Views: 26
Reputation: 780818
while (have_posts()) :
should be
while ($frontpage_query->have_posts()) :
Upvotes: 3