feat: hero fix, Kadence footer removal, Sobre ACRIB timeline, Novedades blog, Polylang (es/ro/en)

- MU-plugin v1.2: transparent header overlay via position:absolute on homepage
  (Kadence Pro workaround), body_class filter at priority 999 to inject
  transparent-header class, Kadence footer removed via remove_action after_setup_theme
- Fixed hero height to exactly 100svh/100vh, removed min-height overflow
- Fixed bottom gap: content-area margin-bottom:0 on homepage
- Removed boxed content styling on homepage (entry-content-wrap)
- Created Sobre ACRIB page (ID 29) with 8-milestone vertical timeline (2018-2025)
- Created Novedades page (ID 30) as WordPress blog posts index
- Added Sobre ACRIB and Novedades to primary nav menu
- Configured Polylang: es (default), ro, en languages
- Fixed Polylang nav_menus option format (lang-keyed menu IDs)
- Added Polylang language switcher to primary menu
- Created RO (acasa) and EN (home-en) homepage stubs
- Added translation locale files for all plugins and Kadence theme

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Malin
2026-05-19 20:40:12 +02:00
parent 222348d544
commit 430defd55f
74 changed files with 20604 additions and 10 deletions

View File

@@ -2,9 +2,29 @@
/**
* ACRIB Core MU-Plugin
* Always-on: custom footer, security hardening, performance tweaks.
* @version 1.0
* @version 1.2
*/
// --- Remove Kadence default copyright footer ---
// template-hooks.php is included at the root of functions.php, so the action
// is added before after_setup_theme fires. Priority 999 removes it after.
add_action('after_setup_theme', function () {
remove_action('kadence_footer', 'Kadence\footer_markup');
remove_action('kadence_footer_html', 'Kadence\footer_html');
}, 999);
// --- Transparent header body class on homepage (Kadence Pro workaround) ---
// Kadence's layout/component.php adds non-transparent-header at priority 10.
// We run at 999 to remove it and add transparent-header (used by Kadence JS).
add_filter('body_class', function ($classes) {
if (is_front_page()) {
$classes = array_diff($classes, ['non-transparent-header', 'mobile-non-transparent-header']);
$classes[] = 'transparent-header';
$classes[] = 'mobile-transparent-header';
}
return $classes;
}, 999);
// --- Footer: bottom bar with legal links + Cloud Host credit ---
add_action('wp_footer', function () {
$year = date('Y');
@@ -67,18 +87,54 @@ 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.
// --- Homepage: inject critical CSS fixes ---
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 */
/* ── Transparent header overlay on homepage ───────────────────────── */
/* Position header absolutely so it overlays the hero without pushing */
/* content down — this is the Kadence Pro "transparent header" effect. */
.home #masthead.site-header{
position:absolute;
top:0;left:0;right:0;
z-index:1000;
background:transparent!important;
box-shadow:none!important;
}
/* Remove the top padding/margin Kadence normally adds to offset the header */
.home .content-area,
.home .site-content,
.home #content{
margin-top:0!important;
padding-top:0!important;
}
/* Remove Kadence blank page-title section above hero (title:hide meta ignored) */
.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}
/* Remove bottom margin that creates gap after the last section */
.home .content-area{margin-bottom:0!important}
/* Remove boxed content styling on homepage */
.home .entry-content-wrap{
padding:0!important;
box-shadow:none!important;
margin:0!important;
background:none!important;
}
/* ── Hero: fill exactly one viewport height ───────────────────────── */
.acrib-hero.wp-block-cover{
height:100svh!important;
height:100vh!important;
min-height:0!important;
}
/* Centre hero content; padding-top clears the overlaid header */
.acrib-hero .wp-block-cover__inner-container{
height:100%!important;
min-height:0!important;
display:flex!important;
flex-direction:column!important;
align-items:center!important;
justify-content:center!important;
padding:80px 2rem 3rem!important;
box-sizing:border-box!important;
}
</style>' . "\n";
}, 5);