|
|
@@ -188,6 +188,20 @@ function dw_ask_widget() {
|
|
|
}
|
|
|
add_action( 'wp_footer', 'dw_ask_widget' );
|
|
|
|
|
|
+// front-page.php is fully self-contained (no wp_head, hand-rolled critical CSS, zero
|
|
|
+// blocks/presets), but WordPress still injects theme.json's global styles โ and its
|
|
|
+// body/h1-h6 element rules override the homepage's intended typography. Strip them on
|
|
|
+// the front page only; the rest of the site keeps them. (front-page.php skips wp_head,
|
|
|
+// so the global styles print during wp_footer โ dequeue before that late-print runs.)
|
|
|
+function dw_no_global_styles_on_home() {
|
|
|
+ if ( is_front_page() ) {
|
|
|
+ wp_dequeue_style( 'global-styles' );
|
|
|
+ wp_dequeue_style( 'global-styles-css-custom-properties' );
|
|
|
+ }
|
|
|
+}
|
|
|
+add_action( 'wp_enqueue_scripts', 'dw_no_global_styles_on_home', 100 );
|
|
|
+add_action( 'wp_footer', 'dw_no_global_styles_on_home', 1 );
|
|
|
+
|
|
|
// Dev only: on a real content save, ping BrowserSync's reload endpoint so the front-end
|
|
|
// preview refreshes โ DB content changes aren't visible to a filesystem watcher otherwise.
|
|
|
// Hooks the REST save events the block editor actually fires (+ customizer + nav menus).
|