Implementar Issues #2-4, #8-13, #16 - Funcionalidades core del tema
Implementación masiva de funcionalidades esenciales del tema apus-theme usando agentes paralelos para máxima eficiencia. **Issues Completados:** **Issue #2 - Eliminar bloat de WordPress:** - inc/performance.php: 13 funciones que remueven emojis, oEmbed, feeds, dashicons, jQuery migrate, XML-RPC, etc. - Optimización completa del frontend **Issue #3 - Desactivar búsqueda nativa:** - inc/search-disable.php: Bloquea queries de búsqueda, widget, formularios - search.php: Retorna 404 con mensaje amigable **Issue #4 - Desactivar comentarios:** - inc/comments-disable.php: 15 funciones que eliminan comentarios de frontend y backend - comments.php: Template desactivado **Issue #8 - Footer con 4 widgets:** - footer.php: Verificado con 4 áreas de widgets y copyright - assets/css/footer.css: Estilos responsive completos - Sistema de anchos configurables **Issue #9 - Jerarquía de plantillas:** - home.php, category.php, tag.php, author.php, date.php, taxonomy.php, attachment.php - 7 nuevas plantillas + 12 verificadas - Template parts completos - Paginación en todos los archives **Issue #10 - Imágenes destacadas:** - inc/featured-image.php: 12 funciones para manejo de featured images - Sin placeholders, lazy loading, alt text automático - Responsive con Bootstrap, aspect ratio **Issue #11 - Badge de categoría:** - inc/category-badge.php: Badge Bootstrap sobre H1 en single posts - Excluye "Uncategorized" - Template tag: apus_display_category_badge() **Issue #12 - TOC automático:** - inc/toc.php: Genera TOC desde H2/H3 - assets/css/toc.css: Estilos con numeración CSS counters - assets/js/toc.js: Smooth scroll, scroll spy, toggle - Configurable con apus_get_option() **Issue #13 - Posts relacionados:** - inc/related-posts.php: Query por categoría, 12 funciones - inc/admin/related-posts-options.php: Sistema de configuración - assets/css/related-posts.css: Cards responsive - Hook automático en single posts **Issue #16 - AdSense delay:** - inc/adsense-delay.php: Retardo de carga hasta scroll/click - assets/js/adsense-loader.js: Detecta interacciones - Mejora FID y TBT para Core Web Vitals **Archivos Modificados:** - functions.php: Includes de nuevos módulos, removido feed support - single.php: Integración de category badge - inc/enqueue-scripts.php: Enqueue de nuevos assets - inc/theme-options-helpers.php: Helper functions para TOC **Archivos Creados:** - 7 nuevas plantillas WordPress - 3 nuevos módulos inc/ (comments-disable, search-disable) - 8 reportes de documentación .md **Estadísticas:** - Total funciones PHP: 60+ nuevas funciones - Líneas de código: 2,500+ líneas - Archivos nuevos: 18 - Archivos modificados: 9 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
128
wp-content/themes/apus-theme/date.php
Normal file
128
wp-content/themes/apus-theme/date.php
Normal file
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying date-based archive pages
|
||||
*
|
||||
* This template displays posts from a specific date (year, month, or day)
|
||||
* with the date information displayed at the top.
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#date
|
||||
*
|
||||
* @package Apus_Theme
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<main id="main-content" class="site-main" role="main">
|
||||
|
||||
<div class="content-wrapper">
|
||||
|
||||
<!-- Primary Content Area -->
|
||||
<div id="primary" class="content-area">
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<!-- Date Archive Header -->
|
||||
<header class="page-header date-header">
|
||||
<?php
|
||||
// Date archive title
|
||||
the_archive_title( '<h1 class="page-title date-title">', '</h1>' );
|
||||
|
||||
// Date archive description
|
||||
$date_description = get_the_archive_description();
|
||||
if ( ! empty( $date_description ) ) :
|
||||
?>
|
||||
<div class="archive-description date-description">
|
||||
<?php echo wp_kses_post( wpautop( $date_description ) ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Date metadata -->
|
||||
<div class="date-meta">
|
||||
<span class="posts-count">
|
||||
<?php
|
||||
global $wp_query;
|
||||
$found_posts = $wp_query->found_posts;
|
||||
printf(
|
||||
/* translators: %s: number of posts */
|
||||
esc_html( _n( '%s post', '%s posts', $found_posts, 'apus-theme' ) ),
|
||||
esc_html( number_format_i18n( $found_posts ) )
|
||||
);
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
</header><!-- .page-header -->
|
||||
|
||||
<!-- Date Posts Loop -->
|
||||
<div class="archive-posts date-posts">
|
||||
|
||||
<?php
|
||||
// Start the WordPress Loop
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
|
||||
/**
|
||||
* Include the Post-Type-specific template for the content.
|
||||
* If you want to override this in a child theme, then include a file
|
||||
* called content-___.php (where ___ is the Post Type name) and that will be used instead.
|
||||
*/
|
||||
get_template_part( 'template-parts/content', get_post_type() );
|
||||
|
||||
endwhile;
|
||||
?>
|
||||
|
||||
</div><!-- .archive-posts -->
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Pagination
|
||||
* Display navigation to next/previous set of posts when applicable.
|
||||
*/
|
||||
the_posts_pagination(
|
||||
array(
|
||||
'mid_size' => 2,
|
||||
'prev_text' => sprintf(
|
||||
'%s <span class="nav-prev-text">%s</span>',
|
||||
'<span class="nav-icon" aria-hidden="true">«</span>',
|
||||
esc_html__( 'Previous', 'apus-theme' )
|
||||
),
|
||||
'next_text' => sprintf(
|
||||
'<span class="nav-next-text">%s</span> %s',
|
||||
esc_html__( 'Next', 'apus-theme' ),
|
||||
'<span class="nav-icon" aria-hidden="true">»</span>'
|
||||
),
|
||||
'before_page_number' => '<span class="screen-reader-text">' . esc_html__( 'Page', 'apus-theme' ) . ' </span>',
|
||||
'aria_label' => esc_attr__( 'Posts navigation', 'apus-theme' ),
|
||||
)
|
||||
);
|
||||
|
||||
else :
|
||||
|
||||
/**
|
||||
* No posts found
|
||||
* Display a message when no content is available.
|
||||
*/
|
||||
get_template_part( 'template-parts/content', 'none' );
|
||||
|
||||
endif;
|
||||
?>
|
||||
|
||||
</div><!-- #primary -->
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Sidebar
|
||||
* Display the sidebar if it's active.
|
||||
*/
|
||||
if ( is_active_sidebar( 'sidebar-1' ) ) :
|
||||
get_sidebar();
|
||||
endif;
|
||||
?>
|
||||
|
||||
</div><!-- .content-wrapper -->
|
||||
|
||||
</main><!-- #main-content -->
|
||||
|
||||
<?php
|
||||
get_footer();
|
||||
Reference in New Issue
Block a user