This repository has been archived on 2024-04-03. You can view files and clone it, but cannot push or open issues or pull requests.
qdouze2-wordpress-theme/components/article.php

40 lines
1.2 KiB
PHP
Raw Permalink Normal View History

2022-12-17 19:46:29 +01:00
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
<?php include(TEMPLATEPATH . '/components/article/flags.php'); ?>
2022-12-18 14:39:50 +01:00
<article class="article container-article mb-1" id="post-<?php the_ID(); ?>">
2022-12-17 19:46:29 +01:00
<?php if ($haveTitle) { ?>
<h1 class="page-title"><?php the_title(); ?></h1>
<?php } else { ?>
<h1 class="sr-only"><?php the_title(); ?></h1>
2022-12-17 19:46:29 +01:00
<?php } ?>
2022-12-18 14:39:50 +01:00
<div class="thumbnail mb-half" aria-hidden="true">
2023-11-20 11:28:46 +01:00
<?php the_post_thumbnail( 'post-size' ); ?>
2022-12-18 14:39:50 +01:00
</div>
<div class="article-entry mb-1">
2022-12-17 19:46:29 +01:00
<?php the_content(); ?>
</div>
<aside class="card card-noheader article-meta">
<h2 class="sr-only">Métadonnées de l'article</h2>
<div class="card-body">
<div class="author-area">
<?php echo get_avatar( get_the_author_meta('user_email'), $size = '120'); ?>
<div class="author-metadata">
<div class="author-pseudo">Écrit par <a href="https://kazhnuz.space"><?php the_author() ?></a></div>
<small class="author-date">Le <?php the_time('l j F Y à H:i') ?></small>
</div>
</div>
2022-12-17 19:46:29 +01:00
<div class="article-category">
<?php include(TEMPLATEPATH . '/components/article/terms.php'); ?>
</div>
</div>
</aside>
</article>
2022-12-17 19:46:29 +01:00
<?php endwhile; ?>
<?php endif; ?>