*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package Blocksy
*/
$header_type = get_theme_mod( 'header_type', 'type-1' );
$template = 'template-parts/header/' . (
str_replace(
'type',
'header',
$header_type
)
);
ob_start();
if ( is_customize_preview() ) {
$for_preview = true;
include locate_template( 'template-parts/header/header-1.php' );
$for_preview = false;
}
$type_1_output = ob_get_clean();
ob_start();
if ( is_customize_preview() ) {
$for_preview = true;
include locate_template( 'template-parts/header/header-2.php' );
$for_preview = false;
}
$type_2_output = ob_get_clean();
ct_add_customizer_preview_cache(
ct_html_tag(
'div',
[ 'data-id' => 'header' ],
ct_html_tag( 'div', [ 'data-type' => 'type-1' ], $type_1_output ) .
ct_html_tag( 'div', [ 'data-type' => 'type-2' ], $type_2_output )
)
);
ct_add_customizer_preview_cache(
ct_html_tag(
'div',
[ 'data-id' => 'header-top-bar' ],
ct_output_header_top_bar()
)
);
ct_header_top_bar_sections_cache();
?>
>
>