Skip to content

Instantly share code, notes, and snippets.

@dryan1144
Last active August 29, 2015 14:06
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 dryan1144/d0c8b650a91ba895cb34 to your computer and use it in GitHub Desktop.
Save dryan1144/d0c8b650a91ba895cb34 to your computer and use it in GitHub Desktop.
Add blog page content before posts
<?php
/*
----------------------------------------------------------------------------------
Ouput content for blog page (Settings > Static page > posts page) page above posts
----------------------------------------------------------------------------------
*/
function wphandcrafted_add_blog_page_content() {
if ( is_home() ) {
$post = get_page( get_option('page_for_posts'));
echo wpautop($post->post_content);
}
}
add_action ('loop_start', 'wphandcrafted_add_blog_page_content');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment