-
-
Save cameronjonesweb/587bed3b56bda32f6769fb51cdd12fdf to your computer and use it in GitHub Desktop.
optional home.php--to show the posts (blog) page's title and content
This file contains hidden or 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 | |
add_action( 'edit_form_after_title', 'posts_page_edit_form' ); | |
function posts_page_edit_form( $post ) { | |
$posts_page = get_option( 'page_for_posts' ); | |
if ( $posts_page === $post->ID ) { | |
// Running this hook seems to remove the page for posts notice, it's a good idea to keep it | |
_wp_posts_page_notice(); | |
add_post_type_support( 'page', 'editor' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment