Created
November 17, 2015 16:20
Remove WordPress Posts Page Admin Notice
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Remove Posts Page Admin Notice | |
* | |
* Since WordPress 4.2, if you edit the page used as the Posts page | |
* and there was no content saved for that page, the editor functionality | |
* is removed and a message displayed instead. | |
* | |
* The following function re-enables the editor on this page. | |
* Uncomment the remove_action line below if you want to remove | |
* the admin message too. | |
* | |
* @param WP_Post $post Post object | |
*/ | |
function remove_posts_page_admin_notice( $post ) { | |
if ( $post->ID == get_option( 'page_for_posts' ) ) { | |
//remove_action( 'edit_form_after_title', '_wp_posts_page_notice' ); | |
add_post_type_support( get_post_type( $post ), 'editor' ); | |
} | |
} | |
add_action( 'add_meta_boxes_page', 'remove_posts_page_admin_notice' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment