Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I don't think I can make the excerpt required, but if anyone knows a workaround please share. At least I want to print a message if excerpt is empty after posts have been publish/update, maybe a red notification to be more visible!

I use this script to show excerpt box by default!

share|improve this question
    
Using the first characters of the post for the excerpt will not work? Because you're going to have to override that behavior as well if that's the case. –  m0r7if3r Mar 5 '12 at 14:10

2 Answers 2

You could always use the has_excerpt() function to test for excerpt content and if it is not filled in you could display a message.

Example:

if( has_excerpt() ) {
    the_excerpt();
} else {
    echo '<p>Please enter the excerpt.</p>';
}
share|improve this answer
    
Where should I put this code?... this looks like a frontend function for themes, I need it in the backend, in wp-admin/new page panel :) –  Nicusor Dumbrava Mar 8 '12 at 1:06

For updateing, you could use the pre_post_update action hook, and if there is no excerpt you could prevent the post being updated and display an error message, but it doesn't look like you can stop the new post from being created.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.