I’m not really sure what you’re talking about here. Are you referring to your previous post? If you are, then yes, it won’t work as-is as a page template–I’d assumed you were using it for front-page.php
or something similar, where the list of posts was already available in the Loop.
On a page template you will have to provide a custom WP_Query
, since the one loaded with that page is, correctly, just the page. You’d also need to add that custom query to the various functions in the custom loop. That would probably look something like this:
$new_query = new WP_Query([
'posts_per_page' => 15 // however many posts you want
]);
if ($new_query->have_posts()) :
while ($new_query->have_posts() && $new_query->current_post < 0): $new_query->the_post();
// do featured post stuff
endwhile;
while ($new_query->have_posts() && $new_query->current_post < 2): $new_query->the_post();
// do secondary post stuff
endwhile;
while ($new_query->have_posts() && $new_query->current_post >= 2): $new_query->the_post();
// do remaining post stuff
endwhile;
wp_reset_postdata();
endif;