- Add ArchiveHeader component (schema, renderer, formbuilder) - Add PostGrid component (schema, renderer, formbuilder) - Unify archive templates (home, archive, category, tag, author, date, search) - Add page visibility system with VisibilityDefaults - Register components in AdminDashboardRenderer - Fix boolean conversion in functions-addon.php - All 172 unit tests passed 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
93 lines
2.5 KiB
PHP
93 lines
2.5 KiB
PHP
<?php
|
|
/**
|
|
* The template for displaying date-based archive pages
|
|
*
|
|
* Estructura unificada siguiendo el patron de single.php.
|
|
* Usa roi_render_component() para todos los componentes.
|
|
* La visibilidad se controla via PageVisibilityHelper::shouldShow().
|
|
*
|
|
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#date
|
|
*
|
|
* @package ROI_Theme
|
|
* @since 1.0.0
|
|
*/
|
|
|
|
get_header();
|
|
?>
|
|
|
|
<main id="main-content" class="site-main" role="main">
|
|
|
|
<!-- Hero Section - Componente dinamico -->
|
|
<?php
|
|
if (function_exists('roi_render_component')) {
|
|
echo roi_render_component('hero');
|
|
}
|
|
?>
|
|
|
|
<!-- Archive Header - Componente dinamico (detecta fecha automaticamente) -->
|
|
<?php
|
|
if (function_exists('roi_render_component')) {
|
|
echo roi_render_component('archive-header');
|
|
}
|
|
?>
|
|
|
|
<!-- Main Content Grid -->
|
|
<?php
|
|
// Determinar si mostrar sidebar basandose en visibilidad de componentes
|
|
$sidebar_components = ['table-of-contents', 'cta-box-sidebar'];
|
|
$show_sidebar = function_exists('roi_should_render_any_wrapper')
|
|
? roi_should_render_any_wrapper($sidebar_components)
|
|
: false;
|
|
$main_col_class = $show_sidebar ? 'col-lg-9' : 'col-lg-12';
|
|
?>
|
|
<div class="container">
|
|
<div class="row">
|
|
|
|
<!-- Main Content Column -->
|
|
<div class="<?php echo esc_attr($main_col_class); ?>">
|
|
|
|
<!-- Post Grid - Componente dinamico -->
|
|
<?php
|
|
if (function_exists('roi_render_component')) {
|
|
echo roi_render_component('post-grid');
|
|
}
|
|
?>
|
|
|
|
</div><!-- .<?php echo esc_attr($main_col_class); ?> -->
|
|
|
|
<?php if ($show_sidebar): ?>
|
|
<!-- Sidebar Column (col-lg-3) -->
|
|
<div class="col-lg-3">
|
|
<div class="sidebar-sticky">
|
|
<!-- Table of Contents - Componente dinamico -->
|
|
<?php
|
|
if (function_exists('roi_render_component')) {
|
|
echo roi_render_component('table-of-contents');
|
|
}
|
|
?>
|
|
|
|
<!-- CTA Box Sidebar - Componente dinamico -->
|
|
<?php
|
|
if (function_exists('roi_render_component')) {
|
|
echo roi_render_component('cta-box-sidebar');
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
</div><!-- .row -->
|
|
</div><!-- .container -->
|
|
|
|
</main><!-- #main-content -->
|
|
|
|
<!-- Contact Form Section - Componente dinamico -->
|
|
<?php
|
|
if (function_exists('roi_render_component')) {
|
|
echo roi_render_component('contact-form');
|
|
}
|
|
?>
|
|
|
|
<?php
|
|
get_footer();
|