skip to Main Content

Override the Page Header Title with a Custom Template

You can use the wpex_{location}_template_id filter to override any theme location Below is an example showing how you could override the page_header location with your custom template ID.

/**
 * Override the page header with a custom template.
 *
 * @link https://total.wpexplorer.com/docs/snippets/page-header-template/
 */
add_filter( 'wpex_page_header_template_id', function( $id ) {
	return 'YOUR_TEMPLATE_ID';
} );

/**
 * Remove page header section from the customizer.
 *
 * @link https://total.wpexplorer.com/docs/snippets/page-header-template/
 */
add_filter( 'wpex_customizer_sections', function( $sections ) {
    unset( $sections['wpex_page_header'] );
    return $sections;
} );
All PHP snippets should be added via child theme's functions.php file or via the Code Snippets Plugin (or alternative plugin)
Back To Top