Modifying the loop to output different code for the first post?
-
Hi everyone,
I’m looking to output and style the first post differently than the rest (on the homepage at least). I’m not sure how to achieve this. I searched Google for a few solutions, but I couldn’t get any of them to work.
I’m assuming it involves a conditional statement. My PHP knowledge is severely lacking but I imagine something with this logic:
if first post
–code for first post–else
–regular code for all other posts–end
Am I even close? How do you reference the first post in the If statement? Is this related to the “offset” attribute?
Any help is greatly appreciated. Also if anyone knows of a link that explains this issue, that would be excellent as well.
Thanks!
- The topic ‘Modifying the loop to output different code for the first post?’ is closed to new replies.