WordPress.org

Ready to get started?Download WordPress

Forums

Looking for some PHP/loop help (8 posts)

  1. resiny
    Member
    Posted 8 years ago #

    I've spent about a half hour digging through the codex and various dark corners of the internets, but I have yet to find my answer.

    I've seen this done before, though I can't think where at the moment (lots of places). I basically need the php.

    What I'm wanting to do is to have the entire text of my first post display on the front page, and then below that the titles and small excerpts of recent entries.

    One way I can see this being done (though I don't know how) is running the loop once to show the first post in full, and then a second time using the_excerpt...

    Anyone know how to do this?

  2. iand
    Member
    Posted 8 years ago #

    This is probably the neatest way to do it (no second loop needed).

  3. mylagoon
    Member
    Posted 8 years ago #

    That nifty piece of code should be in the codex somewhere.
    I'm sure it would be useful for a lot of users.

  4. resiny
    Member
    Posted 8 years ago #

    deleted. didn't mean to post

  5. resiny
    Member
    Posted 8 years ago #

    alright, it's sortta working. what's the easiest way to customize what is displayed for the_excerpt?

  6. moshu
    Member
    Posted 8 years ago #

    I don't have an aswer for styling the posts differently if there is only one Loop - though probably more knowledgable helpers can show you a way.
    However, just for the record, in this thread there are a lot of good ideas and examples for something similar to what you asked initially. I also use Kaf's code in one of my blogs.
    http://wordpress.org/support/topic/28203?replies=15

  7. Chris_K
    Member
    Posted 8 years ago #

    As I recall, the_excerpt strips most formatting. However, there's a plugin that let's you do all sorts of fun stuff with it at http://guff.szub.net/2005/02/26/the-excerpt-reloaded/

  8. resiny
    Member
    Posted 8 years ago #

    As I recall, the_excerpt strips most formatting. However, there's a plugin that let's you do all sorts of fun stuff with it at guff.szub.net/2005/02/26/the-excerpt-reloaded/

    Ah, perfect, looks like it'll do what I'm looking for

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.