section and everything up until
* * @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(); blocksy_add_customizer_preview_cache( function () use ($type_1_output, $type_2_output) { return blocksy_html_tag( 'div', [ 'data-id' => 'header' ], blocksy_html_tag( 'div', [ 'data-type' => 'type-1' ], $type_1_output ) . blocksy_html_tag( 'div', [ 'data-type' => 'type-2' ], $type_2_output ) ); } ); blocksy_add_customizer_preview_cache( function () { return blocksy_html_tag( 'div', [ 'data-id' => 'header-top-bar' ], blocksy_output_header_top_bar() ); } ); blocksy_header_top_bar_sections_cache(); ?> > >