WordPress.org

Ready to get started?Download WordPress

Forums

Full posts and excerpts (2 posts)

  1. bohboh
    Member
    Posted 7 years ago #

    I maybe missing something really obvious here, but is there a way of outputting posts like so:

    "if this post has an excerpt then display it else display the post."

    There are times when some of my posts are small so dont need an excerpt whereas the long posts do to prevent long pages.

    Basically, give excerpts priority over the main post. I have set options to display summary but it doesnt make a difference.

    if(the_excerpt() != ""){
         the_excerpt();
    } else {
         the_content();
    }

    but that doesnt work, it seems to output the excerpt twice.

    What am i doing wrong?

  2. bohboh
    Member
    Posted 7 years ago #

    Ok, i found a plugin which would do this.

    http://guff.szub.net/2005/02/26/the-excerpt-reloaded/

Topic Closed

This topic has been closed to new replies.

About this Topic