To add some style to your excerpts, you can easily add a WYSIWYG editor to your excerpt box.
If you’re registering your own post type, include the supports
parameter but don’t include excerpt
in the array. This will tell WordPress not to render the excerpt box.
Use the standard WordPress function remove_post_type_support
, to remove the editor. For example, to remove the editor from Posts, place this in your theme’s functions.php file, or your main plugin file:
function my_remove_post_type_support() {
remove_post_type_support('post', 'excerpt');
}
add_action('init', 'my_remove_post_type_support', 10);
'scope' => 'post'
since WordPress saves this data in the post table.'field' => 'post_excerpt'
is the field name for the default excerpt field.'template' => 'field'
Uses the Piklist “field-only” template with no label.piklist('field', array(
'type' => 'editor'
,'scope' => 'post'
,'template' => 'field'
,'field' => 'post_excerpt'
,'options' => array (
'media_buttons' => false
,'teeny' => true
)
));
That’s it. Your done.
This documentation is a community effort. Please create an issue or pull request to help!