Header layouts in the The7 theme are global, there is no option to change it on a page wise. When you use Microsite template, you can hide/show header, select a different menu, logo etc, still no option to change header layout etc. This can be achieved by changing The7 config values using hooks.
add_action( 'get_header', 'change_header_layout', 10 ); function change_header_layout() { $config = Presscore_Config::get_instance(); if(is_page(2)) { $config->set( 'header.layout', 'top_line' ); } }
Available header layout config values are 'classic', 'inline', 'split', 'side', 'top_line', 'side_line', 'menu_icon'
But that alone cannot give you the expected result, you may need to adjust some other config values based on your current header layout and required layout. To know the exact required config values, try to print it in above hook like this.
echo "<pre>"; print_r($config); echo "</pre>";
Then go to Theme options and configure the required layout (you may take a back up of your settings before) and open the page in new tab and compare the config values and change them in your function.
Not done yet, The Styling
The7 only generate required styles for your selected header layout when you save theme options. So your new header won’t have all the required styles. Configure the required secondary layout in Theme option and open the page in a new tab and inspect element look for the missing CSS rules and copy them to your page.
!important: This is relatively complicated and only suggested for developers.
Hello,
I use the7 and elementor.
I’m facing a problem with the header.
How should it be possible to change the header from the7 to a elementor header template which is specific per language ?
Switch to Ocean WP ?
Regards,
Bernard