Display 5 posts on front page, 6 on the rest
-
If you view my site here, https://laniwa.net/ you see that I have the first post as a full post, while the rest are excerpts. It works well on the first page where there are 5 posts, but on the rest of the pages there is a “blank” space where it looks like a 6th post should be. Is it possible that on all pages but the first, I show 6 posts instead of 5?
Here is the code I am using to accomplish what I have:
<?php if (have_posts()) : $counter = 1; toolbox_content_nav( 'nav-above' ); while (have_posts()) : the_post(); if( $counter == 1 && !$wp_query->query_vars['paged']) { ?> <?php get_template_part( 'content', get_post_format() ); ?> <?php } else { ?> <?php get_template_part( 'content-excerpt', get_post_format() ); ?> <?php } $counter++; endwhile; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Display 5 posts on front page, 6 on the rest’ is closed to new replies.