Support » Fixing WordPress » How to put latest post in a separate Div to other posts

  • Kanger

    (@kanger)


    Hello

    I am displaying post excerpts on page and I wish the latest excerpt to be in a separate div that I can style and position (basically I want most recent post excerpt to be above a ribbon banner on page and rest of post excerpts to be below that banner).

    Anyone know how to do this?

    Thanks in advance for any ideas

Viewing 5 replies - 1 through 5 (of 5 total)
  • esmi

    (@esmi)

    Forum Moderator

    This has been answered in one form or another many, many, times. Please try searching the forums before posting.
    http://wordpress.org/search/re-style+first+post

    Kanger

    (@kanger)

    thanks…I’ve looked at quite a few…I should have explained in my OP that I’m using excerpts…so I wish layout to look like this

    So think I possibly need to style excerpts not post? Wish to style latest post excerpt differently to older post excerpts.

    esmi

    (@esmi)

    Forum Moderator

    It doesn’t matter if you;re using the_excerpt() or the_content(). The approach is identical.

    WebTechGlobal

    (@webtechglobal)

    Yes esmi is correct.

    Kanger what you need to examine is The Loop. The loop is where WordPress loops through all posts or pages.

    Inside the loop, the_excerpt() and the_content() is used.

    There are endless approaches to doing what you need to do but the basic simply requires you to count the number of posts displayed already then after a certain number begin printing different html/styles/div

    Hope that helps to clear it up. Have fun messing around with this part of WordPress it can get interesting.

    Kanger

    (@kanger)

    After searching all the forum posts on this and docs…I found this to be the best and simplest solution…

    hope it saves others time

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to put latest post in a separate Div to other posts’ is closed to new replies.