Reescritura COMPLETA de header.php, footer.php y single.php para replicar EXACTAMENTE la estructura del template RDash (líneas 54-1155). **Issue #82 - header.php (líneas 54-133):** - ✅ Eliminados wrappers extra: <div id="page">, <div id="content"> - ✅ Top Notification Bar: container (NO container-fluid), sin cookie check - ✅ Navbar: toggler PRIMERO, collapse con menú + botón Let's Talk - ✅ Estructura HTML limpia sin wrappers innecesarios **Issue #83 - footer.php (líneas 1022-1155):** - ✅ Footer Contact Form: col-lg-5 (info) + col-lg-7 (form) correcto - ✅ Footer Principal: footer.py-5.mt-0.bg-dark.text-white - ✅ Widget areas: 3 cols pequeñas + 1 newsletter con offset - ✅ Social icons agregados: Twitter, Instagram, Facebook - ✅ Eliminado footer menu (no está en template) **Issue #84 - single.php (líneas 135-1020) - CRÍTICO:** - ✅ Hero Section: container-fluid.py-5.mb-4.hero-title con category badges + H1 - ✅ Grid layout: container > row > col-lg-9 + col-lg-3 - ✅ Orden correcto en col-lg-9: 1. Featured Image 2. Post Content 3. Share Buttons (6 redes) 4. CTA A/B Testing (variante A y B) 5. Related Posts (12 cards simples #f8f9fa) 6. Paginación - ✅ Eliminados wrappers WordPress: <article>, <header>, <footer>, <main>, <div id="primary"> - ✅ Eliminado post meta, tags, comments, post navigation **Problemas CRÍTICOS resueltos:** - ❌ Sidebar en medio → ✅ Sidebar al LADO (col-lg-3) - ❌ Related posts vibrantes → ✅ Cards simples #f8f9fa - ❌ Hero section ausente → ✅ Hero con gradiente navy - ❌ Wrappers extra → ✅ Estructura limpia - ❌ Elements faltantes → ✅ Todos los componentes presentes **Validación:** - ✅ Sintaxis PHP: 0 errores en 3 archivos - ✅ Estructura HTML: Replica exactamente template RDash - ✅ Grid layout: Bootstrap 5.3.2 correcto - ✅ Orden de componentes: Idéntico al template **Estadísticas:** - 3 archivos reescritos completamente - single.php: -258 líneas antiguas, +207 líneas nuevas - header.php: -110 líneas antiguas, +94 líneas nuevas - footer.php: -190 líneas antiguas, +151 líneas nuevas - Total: Código más limpio y fiel al template Closes #82, #83, #84 Relacionado con: #81 (FASE 2 principal), #57 (Discrepancias visuales) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,72 +1,79 @@
|
||||
<?php
|
||||
/**
|
||||
* The footer template file
|
||||
* Footer Template
|
||||
*
|
||||
* This template displays the site footer including widget areas,
|
||||
* copyright information, and the closing HTML tags.
|
||||
* Replica EXACTAMENTE la estructura del template RDash (líneas 1022-1155)
|
||||
* Sin wrappers extra.
|
||||
*
|
||||
* @package Apus_Theme
|
||||
* @since 1.0.0
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php if (is_active_sidebar('footer-contact')) : ?>
|
||||
<!-- Footer Contact Form Section (Issue #37) -->
|
||||
<section class="footer-contact-section py-5 mt-5 bg-secondary bg-opacity-25">
|
||||
<!-- Footer Contact Form Section (Template líneas 1023-1086) -->
|
||||
<section class="py-5 mt-5 bg-secondary bg-opacity-25">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-10">
|
||||
<h2 class="h3 text-center mb-4"><?php esc_html_e('¿Tienes un proyecto en mente?', 'apus-theme'); ?></h2>
|
||||
|
||||
<div class="row">
|
||||
<!-- Info Column -->
|
||||
<!-- Contact Info - col-lg-5 (Template líneas 1030-1064) -->
|
||||
<div class="col-lg-5 mb-4 mb-lg-0">
|
||||
<h2 class="h3 mb-3"><?php _e('¿Tienes alguna pregunta?', 'apus-theme'); ?></h2>
|
||||
<p class="mb-4"><?php _e('Completa el formulario y nuestro equipo te responderá en menos de 24 horas.', 'apus-theme'); ?></p>
|
||||
<div class="contact-info">
|
||||
<h3 class="h5 mb-4"><?php esc_html_e('Información de Contacto', 'apus-theme'); ?></h3>
|
||||
|
||||
<div class="d-flex align-items-start mb-3">
|
||||
<i class="bi bi-telephone-fill me-3 fs-5 text-primary-orange"></i>
|
||||
<i class="bi bi-telephone-fill fs-4 me-3" style="color: #FF8600;"></i>
|
||||
<div>
|
||||
<h6 class="mb-1"><?php _e('Teléfono', 'apus-theme'); ?></h6>
|
||||
<p class="mb-0 text-muted">+52 55 1234 5678</p>
|
||||
<h6 class="mb-1"><?php esc_html_e('Teléfono', 'apus-theme'); ?></h6>
|
||||
<p class="mb-0 text-muted">+52 123 456 7890</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-start mb-3">
|
||||
<i class="bi bi-envelope-fill me-3 fs-5 text-primary-orange"></i>
|
||||
<i class="bi bi-envelope-fill fs-4 me-3" style="color: #FF8600;"></i>
|
||||
<div>
|
||||
<h6 class="mb-1"><?php _e('Email', 'apus-theme'); ?></h6>
|
||||
<h6 class="mb-1"><?php esc_html_e('Email', 'apus-theme'); ?></h6>
|
||||
<p class="mb-0 text-muted">contacto@apumexico.com</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-start">
|
||||
<i class="bi bi-geo-alt-fill me-3 fs-5 text-primary-orange"></i>
|
||||
<i class="bi bi-geo-alt-fill fs-4 me-3" style="color: #FF8600;"></i>
|
||||
<div>
|
||||
<h6 class="mb-1"><?php _e('Ubicación', 'apus-theme'); ?></h6>
|
||||
<p class="mb-0 text-muted"><?php _e('Ciudad de México, México', 'apus-theme'); ?></p>
|
||||
<h6 class="mb-1"><?php esc_html_e('Ubicación', 'apus-theme'); ?></h6>
|
||||
<p class="mb-0 text-muted"><?php esc_html_e('Ciudad de México, México', 'apus-theme'); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Form Column -->
|
||||
|
||||
<!-- Contact Form - col-lg-7 (Template líneas 1066-1084) -->
|
||||
<div class="col-lg-7">
|
||||
<form id="footerContactForm">
|
||||
<div class="row g-3">
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="footerFullName" name="fullName" placeholder="<?php esc_attr_e('Nombre completo *', 'apus-theme'); ?>" required>
|
||||
<label for="footerFullName" class="form-label"><?php esc_html_e('Nombre completo *', 'apus-theme'); ?></label>
|
||||
<input type="text" class="form-control" id="footerFullName" name="fullName" required>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="footerCompany" name="company" placeholder="<?php esc_attr_e('Empresa', 'apus-theme'); ?>">
|
||||
<label for="footerCompany" class="form-label"><?php esc_html_e('Empresa', 'apus-theme'); ?></label>
|
||||
<input type="text" class="form-control" id="footerCompany" name="company">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="tel" class="form-control" id="footerWhatsapp" name="whatsapp" placeholder="<?php esc_attr_e('WhatsApp *', 'apus-theme'); ?>" required>
|
||||
<label for="footerWhatsapp" class="form-label"><?php esc_html_e('WhatsApp *', 'apus-theme'); ?></label>
|
||||
<input type="tel" class="form-control" id="footerWhatsapp" name="whatsapp" required>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="email" class="form-control" id="footerEmail" name="email" placeholder="<?php esc_attr_e('Correo electrónico *', 'apus-theme'); ?>" required>
|
||||
<label for="footerEmail" class="form-label"><?php esc_html_e('Email *', 'apus-theme'); ?></label>
|
||||
<input type="email" class="form-control" id="footerEmail" name="email" required>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<textarea class="form-control" id="footerComments" name="comments" rows="4" placeholder="<?php esc_attr_e('¿En qué podemos ayudarte?', 'apus-theme'); ?>"></textarea>
|
||||
<label for="footerComments" class="form-label"><?php esc_html_e('Comentarios', 'apus-theme'); ?></label>
|
||||
<textarea class="form-control" id="footerComments" name="comments" rows="4"></textarea>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<button type="submit" class="btn btn-contact-submit w-100">
|
||||
<i class="bi bi-send-fill me-2"></i><?php _e('Enviar Mensaje', 'apus-theme'); ?>
|
||||
<i class="bi bi-send-fill me-2"></i><?php esc_html_e('Enviar Mensaje', 'apus-theme'); ?>
|
||||
</button>
|
||||
</div>
|
||||
<div id="footerFormMessage" class="col-12 mt-2 alert" style="display: none;"></div>
|
||||
@@ -78,110 +85,64 @@
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!-- #content .site-content -->
|
||||
|
||||
<!-- Footer Principal (Template líneas 1088-1147) -->
|
||||
<footer class="py-5 mt-0 bg-dark text-white" role="contentinfo">
|
||||
|
||||
<?php if ( is_active_sidebar( 'footer-1' ) || is_active_sidebar( 'footer-2' ) || is_active_sidebar( 'footer-3' ) || is_active_sidebar( 'footer-4' ) ) : ?>
|
||||
<div class="footer-widgets">
|
||||
<div class="container">
|
||||
<div class="row g-4">
|
||||
|
||||
<!-- Footer Widget Area 1 -->
|
||||
<div class="row">
|
||||
<!-- Widget Areas (3 columnas pequeñas) -->
|
||||
<?php if (is_active_sidebar('footer-1')) : ?>
|
||||
<div class="<?php echo esc_attr( apus_get_footer_column_class( 1 ) ); ?>">
|
||||
<aside class="footer-widget-area footer-widget-1" role="complementary" aria-label="<?php esc_attr_e( 'Footer Widget Area 1', 'apus-theme' ); ?>">
|
||||
<div class="col-6 col-md-2 mb-3">
|
||||
<?php dynamic_sidebar('footer-1'); ?>
|
||||
</aside>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Footer Widget Area 2 -->
|
||||
<?php if (is_active_sidebar('footer-2')) : ?>
|
||||
<div class="<?php echo esc_attr( apus_get_footer_column_class( 2 ) ); ?>">
|
||||
<aside class="footer-widget-area footer-widget-2" role="complementary" aria-label="<?php esc_attr_e( 'Footer Widget Area 2', 'apus-theme' ); ?>">
|
||||
<div class="col-6 col-md-2 mb-3">
|
||||
<?php dynamic_sidebar('footer-2'); ?>
|
||||
</aside>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Footer Widget Area 3 -->
|
||||
<?php if (is_active_sidebar('footer-3')) : ?>
|
||||
<div class="<?php echo esc_attr( apus_get_footer_column_class( 3 ) ); ?>">
|
||||
<aside class="footer-widget-area footer-widget-3" role="complementary" aria-label="<?php esc_attr_e( 'Footer Widget Area 3', 'apus-theme' ); ?>">
|
||||
<div class="col-6 col-md-2 mb-3">
|
||||
<?php dynamic_sidebar('footer-3'); ?>
|
||||
</aside>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Footer Widget Area 4 -->
|
||||
<!-- Newsletter Area (1 columna grande) -->
|
||||
<?php if (is_active_sidebar('footer-4')) : ?>
|
||||
<div class="<?php echo esc_attr( apus_get_footer_column_class( 4 ) ); ?>">
|
||||
<aside class="footer-widget-area footer-widget-4" role="complementary" aria-label="<?php esc_attr_e( 'Footer Widget Area 4', 'apus-theme' ); ?>">
|
||||
<div class="col-md-5 offset-md-1 mb-3">
|
||||
<?php dynamic_sidebar('footer-4'); ?>
|
||||
</aside>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!-- .row -->
|
||||
</div><!-- .container -->
|
||||
</div><!-- .footer-widgets -->
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Footer Bottom / Copyright Section -->
|
||||
<div class="footer-bottom">
|
||||
<div class="container">
|
||||
<div class="row align-items-center">
|
||||
|
||||
<!-- Copyright Information -->
|
||||
<div class="col-md-6 col-12 text-center text-md-start mb-3 mb-md-0">
|
||||
<div class="copyright-text">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: 1: Copyright symbol, 2: Current year, 3: Site name */
|
||||
esc_html__( '%1$s %2$s %3$s. Todos los derechos reservados.', 'apus-theme' ),
|
||||
'©',
|
||||
esc_html( gmdate( 'Y' ) ),
|
||||
'<span class="site-name">' . esc_html( get_bloginfo( 'name' ) ) . '</span>'
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Footer Menu -->
|
||||
<div class="col-md-6 col-12 text-center text-md-end">
|
||||
<?php
|
||||
if ( has_nav_menu( 'footer' ) ) {
|
||||
wp_nav_menu(
|
||||
array(
|
||||
'theme_location' => 'footer',
|
||||
'menu_id' => 'footer-menu',
|
||||
'menu_class' => 'footer-menu',
|
||||
'container' => 'nav',
|
||||
'container_class' => 'footer-navigation',
|
||||
'container_aria_label' => esc_attr__( 'Footer Menu', 'apus-theme' ),
|
||||
'depth' => 1,
|
||||
'fallback_cb' => false,
|
||||
)
|
||||
);
|
||||
}
|
||||
?>
|
||||
<!-- Copyright y Social Icons (Template líneas 1118-1132) -->
|
||||
<div class="d-flex flex-column flex-sm-row justify-content-between py-4 my-4 border-top">
|
||||
<p>© <?php echo date('Y'); ?> <?php bloginfo('name'); ?>. <?php esc_html_e('Todos los derechos reservados.', 'apus-theme'); ?></p>
|
||||
<ul class="list-unstyled d-flex">
|
||||
<li class="ms-3">
|
||||
<a class="link-light" href="#" aria-label="<?php esc_attr_e('Twitter', 'apus-theme'); ?>">
|
||||
<i class="bi bi-twitter"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="ms-3">
|
||||
<a class="link-light" href="#" aria-label="<?php esc_attr_e('Instagram', 'apus-theme'); ?>">
|
||||
<i class="bi bi-instagram"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="ms-3">
|
||||
<a class="link-light" href="#" aria-label="<?php esc_attr_e('Facebook', 'apus-theme'); ?>">
|
||||
<i class="bi bi-facebook"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div><!-- .row -->
|
||||
</div><!-- .container -->
|
||||
</div><!-- .footer-bottom -->
|
||||
|
||||
</footer><!-- #colophon -->
|
||||
|
||||
</div><!-- #page -->
|
||||
|
||||
<!-- Modal Container - Carga dinámica del modal de contacto (Issue #34) -->
|
||||
<div id="modalContainer">
|
||||
<?php get_template_part( 'template-parts/modal', 'contact' ); ?>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Modal Container (Template línea 1150) -->
|
||||
<div id="modalContainer"></div>
|
||||
|
||||
<?php wp_footer(); ?>
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
* The header for our theme
|
||||
* Header Template
|
||||
*
|
||||
* Navbar sticky con Bootstrap 5.3.2 y animaciones según template del cliente.
|
||||
* Incluye: sticky positioning, gradient animations, responsive hamburger menu.
|
||||
* Replica EXACTAMENTE la estructura del template RDash (líneas 54-133)
|
||||
* Sin wrappers extra.
|
||||
*
|
||||
* @package Apus_Theme
|
||||
* @since 1.0.0
|
||||
@@ -14,23 +14,13 @@
|
||||
<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(); ?> data-bs-spy="scroll" data-bs-target=".toc-container" data-bs-offset="100">
|
||||
<?php wp_body_open(); ?>
|
||||
|
||||
<!-- Skip to main content link para accesibilidad -->
|
||||
<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">
|
||||
|
||||
<!-- Top Notification Bar (Template líneas 253-262) -->
|
||||
<?php if ( ! isset( $_COOKIE['apus_notification_dismissed'] ) ) : ?>
|
||||
<!-- Top Notification Bar (Template líneas 255-262) -->
|
||||
<div id="topNotificationBar" class="top-notification-bar">
|
||||
<div class="container">
|
||||
<div class="d-flex align-items-center justify-content-center">
|
||||
@@ -46,13 +36,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Navbar Sticky con Bootstrap 5 - RDash Colors (Issue #41) -->
|
||||
<!-- Navbar (Template líneas 264-320) -->
|
||||
<nav class="navbar navbar-expand-lg navbar-dark py-3" role="navigation" aria-label="<?php esc_attr_e('Primary Navigation', 'apus-theme'); ?>">
|
||||
<div class="container">
|
||||
|
||||
<!-- Hamburger Toggle Button (Bootstrap 5) - PRIMERO según template línea 286 -->
|
||||
<!-- Hamburger Toggle Button - PRIMERO según template línea 286 -->
|
||||
<button class="navbar-toggler"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
@@ -67,16 +56,14 @@
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<?php
|
||||
if (has_nav_menu('primary')) {
|
||||
wp_nav_menu(
|
||||
array(
|
||||
wp_nav_menu(array(
|
||||
'theme_location' => 'primary',
|
||||
'container' => false,
|
||||
'menu_class' => 'navbar-nav mb-2 mb-lg-0',
|
||||
'fallback_cb' => false,
|
||||
'depth' => 2,
|
||||
'walker' => new WP_Bootstrap_Navwalker(),
|
||||
)
|
||||
);
|
||||
));
|
||||
} else {
|
||||
// Fallback si no hay menú asignado
|
||||
?>
|
||||
@@ -104,6 +91,3 @@
|
||||
|
||||
</div><!-- .container -->
|
||||
</nav><!-- .navbar -->
|
||||
|
||||
<!-- Main Content Area -->
|
||||
<div id="content" class="site-content">
|
||||
|
||||
@@ -1,257 +1,207 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying single posts
|
||||
* Single Post Template
|
||||
*
|
||||
* This template displays individual blog posts with featured images,
|
||||
* category badges, meta information, and full content.
|
||||
* Prepared for TOC (Table of Contents) and related posts functionality.
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
|
||||
* Replica EXACTAMENTE la estructura del template RDash (líneas 135-1020)
|
||||
* Sin wrappers extra de WordPress tradicional.
|
||||
*
|
||||
* @package Apus_Theme
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
get_header();
|
||||
|
||||
// Display Hero Section (Issue #40)
|
||||
get_template_part('template-parts/content', 'hero');
|
||||
?>
|
||||
|
||||
<main id="main-content" class="site-main" role="main">
|
||||
<?php while (have_posts()) : the_post(); ?>
|
||||
|
||||
<!-- Container Bootstrap exacto del template -->
|
||||
<!-- Hero Section (Template líneas 141-167) -->
|
||||
<div class="container-fluid py-5 mb-4 hero-title">
|
||||
<div class="container">
|
||||
<!-- Category Badges -->
|
||||
<div class="mb-3 d-flex justify-content-center">
|
||||
<div class="d-flex gap-2 flex-wrap justify-content-center">
|
||||
<?php
|
||||
$categories = get_the_category();
|
||||
if (!empty($categories)) {
|
||||
foreach ($categories as $category) {
|
||||
if ($category->name !== 'Uncategorized' && $category->name !== 'Sin categoría') {
|
||||
?>
|
||||
<a href="<?php echo esc_url(get_category_link($category->term_id)); ?>" class="category-badge category-badge-hero">
|
||||
<i class="bi bi-folder-fill me-1"></i>
|
||||
<?php echo esc_html($category->name); ?>
|
||||
</a>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Post Title -->
|
||||
<h1 class="display-5 fw-bold text-center"><?php the_title(); ?></h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Main Content Grid (Template líneas 169-1020) -->
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
||||
<!-- Columna Principal (9/12) - Template línea 349 -->
|
||||
<!-- Main Content Column (col-lg-9) -->
|
||||
<div class="col-lg-9">
|
||||
<div id="primary" class="content-area">
|
||||
|
||||
<?php
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<!-- Featured Image -->
|
||||
<?php
|
||||
// Use the new featured image function
|
||||
echo apus_get_featured_image(
|
||||
get_the_ID(),
|
||||
'apus-featured-large',
|
||||
array(
|
||||
'loading' => 'eager',
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
<!-- Article Header -->
|
||||
<header class="entry-header">
|
||||
|
||||
<!-- Category Badge -->
|
||||
<?php
|
||||
// Display single category badge above title
|
||||
apus_display_category_badge();
|
||||
?>
|
||||
|
||||
<!-- Post Title -->
|
||||
<h1 class="entry-title">
|
||||
<?php the_title(); ?>
|
||||
</h1>
|
||||
|
||||
<!-- Post Meta Information -->
|
||||
<div class="entry-meta">
|
||||
<span class="posted-on">
|
||||
<time class="entry-date published" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: post date */
|
||||
esc_html__( 'Published on %s', 'apus-theme' ),
|
||||
'<span class="date-text">' . esc_html( get_the_date() ) . '</span>'
|
||||
);
|
||||
?>
|
||||
</time>
|
||||
|
||||
<?php
|
||||
// Display updated date if different from published date
|
||||
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) :
|
||||
?>
|
||||
<time class="updated" datetime="<?php echo esc_attr( get_the_modified_date( 'c' ) ); ?>">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: post modified date */
|
||||
esc_html__( 'Updated: %s', 'apus-theme' ),
|
||||
'<span class="date-text">' . esc_html( get_the_modified_date() ) . '</span>'
|
||||
);
|
||||
?>
|
||||
</time>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
|
||||
<span class="byline">
|
||||
<span class="author vcard">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: post author */
|
||||
esc_html__( 'By %s', 'apus-theme' ),
|
||||
'<a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a>'
|
||||
);
|
||||
?>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<?php
|
||||
// Display reading time estimate
|
||||
$content = get_post_field( 'post_content', get_the_ID() );
|
||||
$word_count = str_word_count( wp_strip_all_tags( $content ) );
|
||||
$reading_time = ceil( $word_count / 200 ); // Average reading speed: 200 words per minute
|
||||
|
||||
if ( $reading_time > 0 ) :
|
||||
?>
|
||||
<span class="reading-time">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: estimated reading time in minutes */
|
||||
esc_html( _n( '%s min read', '%s min read', $reading_time, 'apus-theme' ) ),
|
||||
esc_html( number_format_i18n( $reading_time ) )
|
||||
);
|
||||
?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</div><!-- .entry-meta -->
|
||||
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<!-- Table of Contents Hook -->
|
||||
<!-- This hook allows plugins or child themes to insert a TOC -->
|
||||
<?php do_action( 'apus_before_post_content' ); ?>
|
||||
|
||||
<!-- Post Content -->
|
||||
<div class="entry-content">
|
||||
<?php
|
||||
the_content(
|
||||
sprintf(
|
||||
wp_kses(
|
||||
/* translators: %s: Post title. Only visible to screen readers. */
|
||||
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'apus-theme' ),
|
||||
array(
|
||||
'span' => array(
|
||||
'class' => array(),
|
||||
),
|
||||
)
|
||||
),
|
||||
get_the_title()
|
||||
)
|
||||
);
|
||||
|
||||
// Display page links for paginated posts
|
||||
wp_link_pages(
|
||||
array(
|
||||
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'apus-theme' ),
|
||||
'after' => '</div>',
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<?php
|
||||
// Display social share buttons
|
||||
apus_display_social_share();
|
||||
?>
|
||||
|
||||
<?php
|
||||
// Display CTA with A/B Testing (Issue #32)
|
||||
get_template_part( 'template-parts/content', 'cta' );
|
||||
?>
|
||||
|
||||
<!-- Post Footer (Tags) -->
|
||||
<footer class="entry-footer">
|
||||
<?php
|
||||
$tags_list = get_the_tag_list( '', esc_html_x( ', ', 'list item separator', 'apus-theme' ) );
|
||||
if ( $tags_list ) :
|
||||
?>
|
||||
<div class="tags-links">
|
||||
<span class="tags-label"><?php esc_html_e( 'Tags:', 'apus-theme' ); ?></span>
|
||||
<?php
|
||||
/* translators: %s: list of tags */
|
||||
printf( '<span class="tags-list">%s</span>', $tags_list ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
?>
|
||||
<?php if (has_post_thumbnail()) : ?>
|
||||
<div class="mb-4">
|
||||
<?php the_post_thumbnail('large', array('class' => 'img-fluid w-100 rounded')); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Post Content -->
|
||||
<div class="post-content">
|
||||
<?php
|
||||
// Edit post link for logged-in users with permission
|
||||
edit_post_link(
|
||||
sprintf(
|
||||
wp_kses(
|
||||
/* translators: %s: Post title. Only visible to screen readers. */
|
||||
__( 'Edit<span class="screen-reader-text"> "%s"</span>', 'apus-theme' ),
|
||||
array(
|
||||
'span' => array(
|
||||
'class' => array(),
|
||||
),
|
||||
)
|
||||
),
|
||||
get_the_title()
|
||||
),
|
||||
'<span class="edit-link">',
|
||||
'</span>'
|
||||
);
|
||||
the_content();
|
||||
|
||||
wp_link_pages(array(
|
||||
'before' => '<div class="page-links">' . esc_html__('Pages:', 'apus-theme'),
|
||||
'after' => '</div>',
|
||||
));
|
||||
?>
|
||||
</footer><!-- .entry-footer -->
|
||||
</div>
|
||||
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
||||
<!-- Share Buttons (Template líneas 786-810) -->
|
||||
<div class="my-5 py-4 border-top">
|
||||
<p class="mb-3 text-muted"><?php esc_html_e('Compartir:', 'apus-theme'); ?></p>
|
||||
<div class="d-flex gap-2 flex-wrap share-buttons">
|
||||
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo urlencode(get_permalink()); ?>"
|
||||
class="btn btn-outline-primary btn-sm" target="_blank" rel="noopener">
|
||||
<i class="bi bi-facebook me-1"></i> Facebook
|
||||
</a>
|
||||
<a href="https://www.instagram.com/"
|
||||
class="btn btn-outline-danger btn-sm" target="_blank" rel="noopener">
|
||||
<i class="bi bi-instagram me-1"></i> Instagram
|
||||
</a>
|
||||
<a href="https://www.linkedin.com/sharing/share-offsite/?url=<?php echo urlencode(get_permalink()); ?>"
|
||||
class="btn btn-outline-info btn-sm" target="_blank" rel="noopener">
|
||||
<i class="bi bi-linkedin me-1"></i> LinkedIn
|
||||
</a>
|
||||
<a href="https://wa.me/?text=<?php echo urlencode(get_the_title() . ' ' . get_permalink()); ?>"
|
||||
class="btn btn-outline-success btn-sm" target="_blank" rel="noopener">
|
||||
<i class="bi bi-whatsapp me-1"></i> WhatsApp
|
||||
</a>
|
||||
<a href="https://twitter.com/intent/tweet?url=<?php echo urlencode(get_permalink()); ?>&text=<?php echo urlencode(get_the_title()); ?>"
|
||||
class="btn btn-outline-dark btn-sm" target="_blank" rel="noopener">
|
||||
<i class="bi bi-twitter-x me-1"></i> X
|
||||
</a>
|
||||
<a href="mailto:?subject=<?php echo urlencode(get_the_title()); ?>&body=<?php echo urlencode(get_permalink()); ?>"
|
||||
class="btn btn-outline-secondary btn-sm">
|
||||
<i class="bi bi-envelope me-1"></i> Email
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CTA A/B Testing (Template líneas 812-841) -->
|
||||
<div class="cta-section cta-variant-a" data-variant="A" style="display: none;">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-8">
|
||||
<h3 class="cta-title"><?php esc_html_e('¿Necesitas acceso a nuestro catálogo completo?', 'apus-theme'); ?></h3>
|
||||
<p class="cta-text mb-md-0"><?php esc_html_e('Descarga miles de análisis de precios unitarios actualizados', 'apus-theme'); ?></p>
|
||||
</div>
|
||||
<div class="col-md-4 text-md-end">
|
||||
<a href="<?php echo esc_url(home_url('/catalogo')); ?>" class="btn btn-light btn-lg cta-button" data-cta-variant="A">
|
||||
<?php esc_html_e('Ver Catálogo', 'apus-theme'); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cta-section cta-variant-b" data-variant="B" style="display: none;">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-8">
|
||||
<h3 class="cta-title"><?php esc_html_e('¿Listo para optimizar tus proyectos?', 'apus-theme'); ?></h3>
|
||||
<p class="cta-text mb-md-0"><?php esc_html_e('Únete a nuestra membresía y accede a contenido exclusivo', 'apus-theme'); ?></p>
|
||||
</div>
|
||||
<div class="col-md-4 text-md-end">
|
||||
<a href="<?php echo esc_url(home_url('/planes')); ?>" class="btn btn-light btn-lg cta-button" data-cta-variant="B">
|
||||
<?php esc_html_e('Conocer Planes', 'apus-theme'); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Related Posts (Template líneas 843-981) -->
|
||||
<div class="my-5 related-posts">
|
||||
<h2 class="h3 mb-4"><?php esc_html_e('Descubre Más Contenido', 'apus-theme'); ?></h2>
|
||||
<div class="row g-4">
|
||||
<?php
|
||||
// Hook for related posts or additional content
|
||||
do_action( 'apus_after_post_content' );
|
||||
// Query para related posts
|
||||
$related_args = array(
|
||||
'post_type' => 'post',
|
||||
'posts_per_page' => 12,
|
||||
'post__not_in' => array(get_the_ID()),
|
||||
'orderby' => 'rand',
|
||||
'no_found_rows' => true,
|
||||
);
|
||||
|
||||
// Display comments section if enabled
|
||||
if ( comments_open() || get_comments_number() ) :
|
||||
comments_template();
|
||||
$related_query = new WP_Query($related_args);
|
||||
|
||||
if ($related_query->have_posts()) :
|
||||
while ($related_query->have_posts()) : $related_query->the_post();
|
||||
?>
|
||||
<div class="col-md-4">
|
||||
<a href="<?php the_permalink(); ?>" class="text-decoration-none">
|
||||
<div class="card h-100 shadow-sm">
|
||||
<div class="card-body d-flex align-items-center justify-content-center p-4">
|
||||
<h5 class="card-title h6 mb-0 text-center"><?php the_title(); ?></h5>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<?php
|
||||
endwhile;
|
||||
wp_reset_postdata();
|
||||
endif;
|
||||
|
||||
// Post navigation (Previous/Next)
|
||||
the_post_navigation(
|
||||
array(
|
||||
'prev_text' => sprintf(
|
||||
'<span class="nav-subtitle">' . esc_html__( 'Previous:', 'apus-theme' ) . '</span> <span class="nav-title">%s</span>',
|
||||
'%title'
|
||||
),
|
||||
'next_text' => sprintf(
|
||||
'<span class="nav-subtitle">' . esc_html__( 'Next:', 'apus-theme' ) . '</span> <span class="nav-title">%s</span>',
|
||||
'%title'
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
endwhile; // End of the loop.
|
||||
?>
|
||||
</div>
|
||||
|
||||
<!-- Pagination (Template líneas 957-980) -->
|
||||
<nav aria-label="<?php esc_attr_e('Navegación de posts relacionados', 'apus-theme'); ?>" class="mt-4">
|
||||
<ul class="pagination justify-content-center">
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="#" aria-label="<?php esc_attr_e('Inicio', 'apus-theme'); ?>">
|
||||
<?php esc_html_e('Inicio', 'apus-theme'); ?>
|
||||
</a>
|
||||
</li>
|
||||
<li class="page-item active" aria-current="page">
|
||||
<a class="page-link" href="#">1</a>
|
||||
</li>
|
||||
<li class="page-item"><a class="page-link" href="#">2</a></li>
|
||||
<li class="page-item"><a class="page-link" href="#">3</a></li>
|
||||
<li class="page-item"><a class="page-link" href="#">4</a></li>
|
||||
<li class="page-item"><a class="page-link" href="#">5</a></li>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="#"><?php esc_html_e('Ver más', 'apus-theme'); ?></a>
|
||||
</li>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="#" aria-label="<?php esc_attr_e('Fin', 'apus-theme'); ?>">
|
||||
<?php esc_html_e('Fin', 'apus-theme'); ?>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div><!-- .related-posts -->
|
||||
|
||||
</div><!-- #primary -->
|
||||
</div><!-- .col-lg-9 -->
|
||||
|
||||
<!-- Columna Sidebar (3/12) - Template línea 1164+ -->
|
||||
<?php
|
||||
/**
|
||||
* Sidebar
|
||||
* Display the sidebar if it's active.
|
||||
*/
|
||||
if ( is_active_sidebar( 'sidebar-1' ) ) :
|
||||
?>
|
||||
<!-- Sidebar Column (col-lg-3) -->
|
||||
<div class="col-lg-3">
|
||||
<?php get_sidebar(); ?>
|
||||
</div><!-- .col-lg-3 -->
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div><!-- .row -->
|
||||
</div><!-- .container -->
|
||||
|
||||
</main><!-- #main-content -->
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php
|
||||
get_footer();
|
||||
|
||||
Reference in New Issue
Block a user