How to display the page title/content in the Posts page?

Posted in wordpress

Source: http://wordpress.stackexchange.com/questions/7685/how-to-display-the-page-title-content-in-the-posts-page

In order to display the actual page title/content of the “posts page” use the following code:

Page Title

Use get_the_title():

echo apply_filters( ‘the_title’, get_the_title( get_option( ‘page_for_posts’ ) ) );

Page Content

Use get_post_field():

echo apply_filters( ‘the_content’, get_post_field( ‘post_content’, get_option( ‘page_for_posts’ ) ) );

In both cases, wrap the output in an apply_filters() call, so that the post title and post content are rendered the same as they would be normally. Otherwise, the data returned via get_the_title() and get_post_field() would lack the usual formatting that WordPress applies via the_title() and the_content(), respectively.