Skip to content

Instantly share code, notes, and snippets.

@cameronjonesweb
Forked from robincornett/functions.php
Last active May 11, 2017 02:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cameronjonesweb/587bed3b56bda32f6769fb51cdd12fdf to your computer and use it in GitHub Desktop.
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
<?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