Get Content From Blog Page

You are using get_the_content() wrong, it can’t take a ID, which is what get_option('page_for_posts') does return, and generally gets the content of the current post inside the loop, in which it has to be used.

To get the actual content of that page you can do:

$page_for_posts_id = get_option( 'page_for_posts' );
$page_for_posts_obj = get_post( $page_for_posts_id );
echo apply_filters( 'the_content', $page_for_posts_obj->post_content );

Or:

$page_for_posts_id = get_option('page_for_posts');
echo get_post_field( 'post_content', $page_for_posts_id );

Leave a Comment