Files
roi-theme/wp-content/themes/apus-theme/header.php
FrankZamora 7ba9080f57 Agregar estructura completa del tema APUS con Bootstrap 5 y optimizaciones de rendimiento
Se implementa tema WordPress personalizado para Análisis de Precios Unitarios con funcionalidades avanzadas:
- Sistema de templates (front-page, single, archive, page, 404, search)
- Integración de Bootstrap 5.3.8 con estructura modular de assets
- Panel de opciones del tema con Customizer API
- Optimizaciones de rendimiento (Critical CSS, Image Optimization, Performance)
- Funcionalidades SEO y compatibilidad con Rank Math
- Sistema de posts relacionados y tabla de contenidos
- Badge de categorías y manejo de AdSense diferido
- Tipografías Google Fonts configurables
- Documentación completa del tema y guías de uso

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 09:31:47 -06:00

133 lines
3.7 KiB
PHP

<?php
/**
* The header template file
*
* This template displays the site header including the opening HTML tags,
* the site navigation, and the header content.
*
* @package Apus_Theme
* @since 1.0.0
*/
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="profile" href="https://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<!-- Skip to main content link for accessibility -->
<a class="skip-link screen-reader-text" href="#main-content">
<?php esc_html_e( 'Skip to content', 'apus-theme' ); ?>
</a>
<div id="page" class="site">
<!-- Sticky Header -->
<header id="masthead" class="site-header" role="banner">
<div class="header-inner container">
<!-- Site Branding / Logo -->
<div class="site-branding">
<?php
if ( has_custom_logo() ) :
the_custom_logo();
else :
?>
<div class="site-identity">
<?php if ( is_front_page() && is_home() ) : ?>
<h1 class="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<?php bloginfo( 'name' ); ?>
</a>
</h1>
<?php else : ?>
<p class="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<?php bloginfo( 'name' ); ?>
</a>
</p>
<?php endif; ?>
<?php
$description = get_bloginfo( 'description', 'display' );
if ( $description || is_customize_preview() ) :
?>
<p class="site-description"><?php echo esc_html( $description ); ?></p>
<?php endif; ?>
</div>
<?php
endif;
?>
</div><!-- .site-branding -->
<!-- Desktop Navigation -->
<nav id="site-navigation" class="main-navigation desktop-nav" role="navigation" aria-label="<?php esc_attr_e( 'Primary Navigation', 'apus-theme' ); ?>">
<?php
wp_nav_menu(
array(
'theme_location' => 'primary',
'menu_id' => 'primary-menu',
'menu_class' => 'primary-menu',
'container' => false,
'fallback_cb' => false,
)
);
?>
</nav><!-- #site-navigation -->
<!-- Mobile Menu Toggle (Hamburger) -->
<button
id="mobile-menu-toggle"
class="mobile-menu-toggle"
aria-controls="mobile-menu"
aria-expanded="false"
aria-label="<?php esc_attr_e( 'Toggle mobile menu', 'apus-theme' ); ?>"
>
<span class="hamburger-icon" aria-hidden="true">
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
</span>
<span class="screen-reader-text"><?php esc_html_e( 'Menu', 'apus-theme' ); ?></span>
</button>
</div><!-- .header-inner -->
</header><!-- #masthead -->
<!-- Mobile Menu Overlay -->
<div id="mobile-menu-overlay" class="mobile-menu-overlay" aria-hidden="true"></div>
<!-- Mobile Navigation -->
<nav id="mobile-menu" class="mobile-menu" role="navigation" aria-label="<?php esc_attr_e( 'Mobile Navigation', 'apus-theme' ); ?>" aria-hidden="true">
<div class="mobile-menu-header">
<span class="mobile-menu-title"><?php esc_html_e( 'Menu', 'apus-theme' ); ?></span>
<button
id="mobile-menu-close"
class="mobile-menu-close"
aria-label="<?php esc_attr_e( 'Close menu', 'apus-theme' ); ?>"
>
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php
wp_nav_menu(
array(
'theme_location' => 'primary',
'menu_id' => 'mobile-primary-menu',
'menu_class' => 'mobile-primary-menu',
'container' => false,
'fallback_cb' => false,
)
);
?>
</nav><!-- #mobile-menu -->
<div id="content" class="site-content">