cgt-wp-theme/archive.php
2026-11-12 21:27:56 +01:00

62 lines
1.6 KiB
PHP

<?php
/**
* Gabarit d'archives par catégorie, étiquette, date ou recherche (archive.php).
*
* @package CGT_FHA
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
get_header();
?>
<section class="cgt-page-hero">
<div class="cgt-container">
<nav class="cgt-breadcrumb" aria-label="<?php esc_attr_e( 'Fil d\'Ariane', 'cgt-fha' ); ?>">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php esc_html_e( 'Accueil', 'cgt-fha' ); ?></a>
<span aria-hidden="true">/</span>
<a href="<?php echo esc_url( cgt_fha_get_local_news_archive_url() ); ?>"><?php esc_html_e( 'Actualités', 'cgt-fha' ); ?></a>
<span aria-hidden="true">/</span>
<span><?php echo esc_html( wp_strip_all_tags( get_the_archive_title() ) ); ?></span>
</nav>
<h1 class="cgt-page-hero__title"><?php the_archive_title(); ?></h1>
<?php if ( get_the_archive_description() ) : ?>
<div class="cgt-page-hero__desc"><?php the_archive_description(); ?></div>
<?php endif; ?>
</div>
</section>
<section class="cgt-section cgt-section--white">
<div class="cgt-container">
<?php if ( have_posts() ) : ?>
<div class="cgt-news-grid">
<?php
while ( have_posts() ) :
the_post();
cgt_fha_render_local_post_card();
endwhile;
?>
</div>
<div class="cgt-pagination">
<?php
the_posts_pagination(
array(
'mid_size' => 2,
'prev_text' => '← Précédent',
'next_text' => 'Suivant →',
)
);
?>
</div>
<?php else : ?>
<p><?php esc_html_e( 'Aucun article trouvé dans cette rubrique.', 'cgt-fha' ); ?></p>
<?php endif; ?>
</div>
</section>
<?php
get_footer();