'any'] applies on the entire site if (in_array($type, ['header', 'footer', 'archive', 'single', 'search', 'error'], true)) { $settings = get_post_meta($template_id, '_bricks_template_settings', true); if (! is_array($settings)) $settings = []; $settings['templateConditions'] = [ [ 'id' => substr(md5((string) $template_id . microtime()), 0, 6), 'main' => 'any', ], ]; // Header templates : sticky on top by default unless &sticky=0 if ($type === 'header' && ($_GET['sticky'] ?? '1') !== '0') { $settings['headerSticky'] = true; // headerStickyOnScroll switches from position:fixed (default brx-sticky) // to position:sticky → header flows normally on load (no content overlap), // sticks only once user starts scrolling. $settings['headerStickyOnScroll'] = true; $report[] = "headerSticky = true + headerStickyOnScroll = true (.brx-sticky.on-scroll)"; } update_post_meta($template_id, '_bricks_template_settings', $settings); $report[] = "_bricks_template_settings.templateConditions = [{main:any}]"; } wp_die('
'
        . esc_html("Template #$template_id ($type) updated:\n  " . implode("\n  ", $report))
        . '
', 'Template meta fixed'); });