• Hello all, I understand that WP makes a “fake” excerpt if one has not been input by the user. I have a fairly basic and seemingly simple question;

    I need to be able to surround that “fake” excerpt with a <div id="blah">the_excerpt</div> block of code. If the user has input a “real” excerpt, it should not have the <div id="blah"> surrounding it, it should simply be the_excerpt (div-less)…

    I hope this makes sense, and that it is possible!

    Thank you for any help.

Viewing 1 replies (of 1 total)
  • Thread Starter marinated

    (@marinated)

    A hacked mashup I think, but it works ??

    If anyone has a more streamlined solution I’d be very thankful.

    if ($post->post_excerpt == "") {
        echo '<div id="blah">';
        the_excerpt();
        echo '</div>';
    }
    else {
        the_excerpt();
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Determine if user has input an excerpt’ is closed to new replies.