Skip to content

Snippet: Display Page Title Above Content

This snippet allows you to automatically display the page title inside the content instead of the header area. If you wish to remove the header area completely or remove the title from the page header area we have snippets for that as well, simply click the "Posted Under" link below the snippet to view other title related snippets.

// Adds page title above content via a hook.
function my_above_content_page_title() {
	echo '<h1>'. wpex_title() .'</h1>';
}
add_action( 'wpex_hook_content_top', 'my_above_content_page_title' );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top