开发者 | stevegrunwell |
---|---|
更新时间 | 2023年12月19日 07:47 |
PHP版本: | 7.0 及以上 |
WordPress版本: | 6.4 |
版权: | MIT |
版权网址: | 版权信息 |
wp-content/plugins/advanced-post-excerpt
.Absolutely! Before the native "Excerpt" meta box is overridden, Advanced Post Excerpt passes an array of post types to the ape_post_types
filter.
If, for instance, you only want the native "post" post type to use Advanced Post Excerpt, you can add the following to your theme's functions.php file:
/*
* Restrict Advanced Post Excerpt to the "post" post type.
*
* @param array $post_types Post types affected by Advanced Post Excerpt.
* @return array A restricted version of $post_types containing only "post".
/
function mytheme_restrict_ape_post_types( $post_types ) {
return array( 'post' );
}
add_filter( 'ape_post_types', 'mytheme_restrict_ape_post_types' );
= Will this work with the WordPress block editor (a.k.a. "Gutenberg")?
Yes! As of version 1.0.0, Advanced Post Excerpt will continue to display the TinyMCE editor in a meta box at the bottom of the block editor. To avoid conflicts, the default "Post Excerpt" panel in the block editor's sidebar will automatically be removed.