WordPress.org

Support

Support » How-To and Troubleshooting » Full posts and excerpts

Full posts and excerpts

  • 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?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Full posts and excerpts’ is closed to new replies.