Hi all.
I want to style my latest post on the homepage ONLY.
All entries are in an entry-head div.
This is my code right now.
<?php if ($postclass = ($post == $posts[0]))
{
echo '<p class="topstory">TOP STORY</p>';
}
?><?php } ?>
<?php if (is_paged()) : ?>
<?php $postclass = ('entry-head'); ?>
<?php else : ?>
<?php if (is_home('')) { ?><?php $postclass = ($post == $posts[0]) ? 'entry-head firstpost' : 'entry-head'; ?><?php } ?>
<?php endif; ?>
<div class="<?php echo $postclass; ?>">
It all works except on archive pages the p class="topstory">TOP STORY</p> displays, like page 2, page 3 etc. How do I stop this?
Is this code I used, did I do it right? If not, could you suggest an alternative?
Thanks a lot.