I want to use the WYWISWYG on my blog page for an introduction text, but can't seem to bring back the WYSIWYG Editor on the page the page I defined as my blog posts page.
Is there any way to force WP to still show the WYSIWYG on the Blog posts page?
I want to use the WYWISWYG on my blog page for an introduction text, but can't seem to bring back the WYSIWYG Editor on the page the page I defined as my blog posts page.
Is there any way to force WP to still show the WYSIWYG on the Blog posts page?
Share Improve this question asked Jan 7, 2019 at 21:50 Fredy31Fredy31 8782 gold badges16 silver badges31 bronze badges2 Answers
Reset to default 3Pre WP 4.9
if( ! function_exists( 'fix_no_editor_on_posts_page' ) ) {
/**
* Add the wp-editor back into WordPress after it was removed in 4.2.2.
*
* @param Object $post
* @return void
*/
function fix_no_editor_on_posts_page( $post ) {
if( isset( $post ) && $post->ID != get_option('page_for_posts') ) {
return;
}
remove_action( 'edit_form_after_title', '_wp_posts_page_notice' );
add_post_type_support( 'page', 'editor' );
}
add_action( 'edit_form_after_title', 'fix_no_editor_on_posts_page', 0 );
}
WP 4.9
if( ! function_exists( 'fix_no_editor_on_posts_page' ) ) {
function fix_no_editor_on_posts_page( $post_type, $post ) {
if( isset( $post ) && $post->ID != get_option('page_for_posts') ) {
return;
}
remove_action( 'edit_form_after_title', '_wp_posts_page_notice' );
add_post_type_support( 'page', 'editor' );
}
add_action( 'add_meta_boxes', 'fix_no_editor_on_posts_page', 0, 2 );
}
Full Details Here
If you want a quick manual fix-
The problem is that the page's content is currently empty.
- Switch the page for posts to a temporary page,
- edit the original page and add some content,
- save,
- set the page for posts page back to the original page.
You'll now be able to edit it whenever you want, as long as you don't empty it again.