fix: move homepage hero CSS into MU-plugin for git tracking
- Hide .entry-hero.page-hero-section on homepage (Kadence renders it even when _kadence_post_layout title:hide is set) - Remove 5rem content-area gap above first block on homepage - .acrib-hero min-height 100svh/100vh (full viewport, transparent header) - Hero inner container flex-centred with 100px top padding for nav clearance - Injected via wp_head (priority 5) so it loads before any theme CSS
This commit is contained in:
@@ -66,3 +66,19 @@ remove_filter('wp_mail', 'wp_staticize_emoji_for_email');
|
||||
if (!defined('WP_POST_REVISIONS')) {
|
||||
define('WP_POST_REVISIONS', 3);
|
||||
}
|
||||
|
||||
// --- Homepage: inject critical CSS to hide Kadence blank title section ---
|
||||
// This overrides what's also in Additional CSS so it's version-controlled here.
|
||||
add_action('wp_head', function () {
|
||||
if (!is_front_page()) return;
|
||||
echo '<style id="acrib-homepage-fixes">
|
||||
/* Remove Kadence blank page-title section above the hero */
|
||||
.home .entry-hero.page-hero-section{display:none!important}
|
||||
/* Remove Kadence content-area top margin that creates a gap */
|
||||
.home .content-area,.home .site-content{margin-top:0!important;padding-top:0!important}
|
||||
/* Hero fills exactly one viewport height (transparent header overlaid) */
|
||||
.acrib-hero.wp-block-cover{min-height:100svh!important;min-height:100vh!important}
|
||||
/* Centre hero content, clear the transparent header */
|
||||
.acrib-hero .wp-block-cover__inner-container{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;min-height:100svh!important;min-height:100vh!important;padding-top:100px!important;padding-bottom:3rem!important;box-sizing:border-box!important}
|
||||
</style>' . "\n";
|
||||
}, 5);
|
||||
|
||||
Reference in New Issue
Block a user