Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End How to display post 1-4 in full and the rest as excerp?

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #27826
    wainot
    Member

    Hi,

    I’m trying to find out how I go about displaying the FULL content of the latest few posts and have the rest of the posts displayed using the excerp?
    Basically I want to do what Chris has done on the css-tricks homepage.
    Can anyone point me in the right direction or maybe even show me the code.

    Thanks

    #70335
    TheDoc
    Member

    I thought I had the answer for you, but what I did was set one up to display something AFTER every two divs.

    Off the top of my head I can’t narrow down exactly what you should do – but this would be an amazing snippet to have (hint, hint, Chris! :D)

    #70336
    TheDoc
    Member

    Having said that, it looks like you can do a similar method:

    Code:


    have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?>


    http://snipplr.com/view/16983/wordpress … fferently/

    #70339
    TheDoc
    Member

    You’ll have to modify how the numbers work (I’m not a PHP guru, so can’t help ya there), but that should be a huge start.

    #70378
    wainot
    Member

    Hey, this works fine.

    I added an elseif for every post I want to treat like a special post. There’s probably a cleaner way to do it but this works for me.

    Thank you.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Back End’ is closed to new topics and replies.