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