Reputation: 831
I want to increase the textarea size of excerpt in wordpress add new post page. I don't want to make changes in files.
Is there any method to increase the size of textarea of excerpt?
Upvotes: 0
Views: 731
Reputation: 831
In your functions.php or any plugin file, paste the below code
function admin_excerpt()
{
echo "<style>";
echo "textarea#excerpt { height: 27em; }";
echo "</style>";
}
add_action('admin_head', 'admin_excerpt');
The above code will increase the rows or height of the textarea for the excerpt. So, instead of a small box of excerpt, now it will show a big box.
Upvotes: 1
Reputation: 533
The easiest way is to probably just add some CSS in:
#excerpt {
height: 150px;
}
This will do that you are thinking. You could easily use a hook to inject this into the admin only section via a plugin or your theme. There are also plugins that would allow you to add in custom css.
Upvotes: 2
Reputation: 2012
This function will allow you to set the number of words that can be in the excerpt. Just drop it in your theme's functions.php file and replace the "20" with the number or words you wish to use. Put it at the very end of the file before the closing ?>
tag.
//custom excerpt length
function aw_custom_excerpt_length( $length ) {
return 20; // set the number to the amount of words you want to appear in the excerpt
}
add_filter( 'excerpt_length', 'aw_custom_excerpt_length');
Upvotes: 1