I'm displaying two posts on my main page, and using post pagination to go through the older posts.
My problem is I want to change the layout a bit of the most recent post. This sounds like a very basic question, and I have seen a lot of answers, but they only solve the problem for the first post on the page, not the actual -one and only- most recent post.
Right now I tried something like this:
<?php if(have_posts()):?> <?php $pcount = 0;?> <?php endif;?> <?php while (have_posts()): the_post(); ?> <?php $pcount++;?> <?php if($pcount < 2): ?> /*some html changes*/ <?php endif; ?> <? endwhile; ?>
This worked great. The first post on the page, which is by default the most recent one, has a changed layout. But when I navigate to the next page, I see the same. The first post (which is actually the third recent post, not the most recent), is also changed...
So, my actual question: How can I check if the post is actually the single most recent one. Not the first on the page.