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>
104 lines
2.6 KiB
PHP
104 lines
2.6 KiB
PHP
<?php
|
|
/**
|
|
* The main template file
|
|
*
|
|
* This is the most generic template file in a WordPress theme and one
|
|
* of the two required files for a theme (the other being style.css).
|
|
* It is used to display a page when nothing more specific matches a query.
|
|
* For example, it puts together the home page when no home.php file exists.
|
|
*
|
|
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
|
*
|
|
* @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() ) :
|
|
|
|
// Check if this is the blog home page
|
|
if ( is_home() && ! is_front_page() ) :
|
|
?>
|
|
<header class="page-header">
|
|
<h1 class="page-title screen-reader-text">
|
|
<?php single_post_title(); ?>
|
|
</h1>
|
|
</header>
|
|
<?php
|
|
endif;
|
|
|
|
// 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;
|
|
|
|
/**
|
|
* 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 and we're not on a full-width page.
|
|
*/
|
|
if ( is_active_sidebar( 'sidebar-1' ) ) :
|
|
get_sidebar();
|
|
endif;
|
|
?>
|
|
|
|
</div><!-- .content-wrapper -->
|
|
|
|
</main><!-- #main-content -->
|
|
|
|
<?php
|
|
get_footer();
|