Posts loop over multiple pages
-
Hello
I’m trying to code a loop that displays a catergory. My wordpress is currently set to 25 posts per page. I want the others to spill over onto more pages but i can’t figure out how.
Can anyone help me?
<section id=”tabs” class=”wrap”>
<?php
$latestPosts = new WP_Query( ‘cat=6’ );
while ($latestPosts->have_posts()) : $latestPosts->the_post(); ?>
<article id=”post-<?php the_ID(); ?>” class=”item”>
<header>
<h2>“><?php the_title(); ?></h2>
</header>
<div class=”entry-summary”>
?php if ( has_post_thumbnail() ) : ?>
<div class=”featured”>
” title=”<?php the_title_attribute(); ?>”>
<?php the_post_thumbnail(‘large’); ?>
</div>
<?php endif; ?>
span<?php if ( has_post_thumbnail() ) : ?> class=”excerpt”<?php endif; ?>><?php the_excerpt(); ?></span>
</div>
</article>
<?php endwhile; ?>
The topic ‘Posts loop over multiple pages’ is closed to new replies.