How to Add a Theme Subheader Using the Elementor Page Builder

Get Started

To display the Reign theme’s subheader while using the Elementor Page Builder, add the following code to your child theme’s functions.php file or use a code snippet plugin.

Code Snippet

/**
* Restore Reign page header when using Elementor.
*/
function reign_theme_restore_page_header() {
    if ( class_exists( 'Reign_Theme_Structure' ) ) {
        $reign_structure = Reign_Theme_Structure::instance();
        // Re-add the render_page_header action if it was removed
        add_action( 'reign_before_content', array( $reign_structure, 'render_page_header' ), 10 );
    }
}
add_action( 'after_setup_theme', 'reign_theme_restore_page_header', 20 );

Explanation

  • The code checks if the Reign_Theme_Structure class exists.

  • It re-adds the render_page_header action to ensure the theme subheader appears before the page content, even when using Elementor.

Note

For best practice, use a code snippet plugin instead of editing theme files directly. This keeps your customization safe from theme updates.

Update on October 17, 2025