Skip to 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.
 */
add_action( 'totaltheme/theme_builder/do_page_header', function() {
    echo '<div class="page-header-template container">';
        totaltheme_render_template( YOUR_TEMPLATE_ID_HERE );
    echo '</div>';
} );

/**
 * Remove page header section from the customizer (optional if you are overriding the page header for the whole site).
 */
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 a plugin.
We recommend Code Snippets (100% Free) or WPCode (sponsored)
Related Snippets
Back To Top