Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Normally your entries are individually wrapped in their own div tags. Most likely the class will be “post” (code located in your main template):

    <div class="post">

    Add a little php code:

    <div class="post<?php if(!is_single() && $post==$posts[0]) echo '-firstpost';?>">

    This code checks two things. 1) The current page must be a listing of entries, not a single entry’s permalink page, and 2) it singles out the first post in the loop array, $posts[0].

    If both conditions are met, “-firstpost” is appended. So your first post’s div will be of the class “post-firstpost” and all other entries simply “post”.

    From here on out, just edit your stylesheet.Create a new entry called “.post-firstpost” and add your style elements to customize.

    Even easier:
    Edit stylesheet. Duplicate the class “.post”, rename the copy to “.post-firstpost”. Now both are identical, a better starting point. Make changes as necessary.

    Hope this helps you out! Make sure to search the forums before asking questions, as this may have been addressed before.

    mindless

    (@mindless)

    Big thank-you for this. Shouldn’t this be considered a bug in 1.5? I mean, it allows you to choose formatting options, but then doesn’t use them!

    Or maybe it’s a template bug? Either way, this is the default config for 1.5 and it shouldn’t be “shipped” this way. The average user isn’t going to want to hack their templates.

Viewing 2 replies - 1 through 2 (of 2 total)