I already have the "Most Recent Posts" set up and showing the latest 5 posts.
How would I go about getting the LATEST POST to show in a different color?
Latest Posts
Post Latest <---This one in color. ??
Post4
Post3
Post2
Post1
I already have the "Most Recent Posts" set up and showing the latest 5 posts.
How would I go about getting the LATEST POST to show in a different color?
Latest Posts
Post Latest <---This one in color. ??
Post4
Post3
Post2
Post1
No takers?
Hmm, I'd do it with a count variable. If you put this to a point directly before your loop starts...
<?php $i = 0; ?>
... and the following lines inside of your loop, where it says <div class="post" id=" ... ">...
<?php if ($i++ == 0) { ?><div class="post-colored" id=" ... ">
<?php } else { ?><div class="post" id=" ... ">
<?php } ?>
... and create a class ".post-colored" in your style.css with the same settings as ".post" (just with a different color or background-color, whatever you want), it should do the trick.
Thank you!
This topic has been closed to new replies.