improvement: amelioration du theme de liste de post

This commit is contained in:
Kazhnuz 2020-12-30 21:49:49 +01:00
parent e8fa8693d1
commit 06ef777f34

View file

@ -1,25 +1,18 @@
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
<article class="list-article" id="post-<?php the_ID(); ?>">
<aside class="list-article-thumbnail">
<?php the_post_thumbnail( ); ?>
</aside>
<div class="list-article-main">
<h2 class="list-article-title"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>""><?php the_title(); ?></a></h2>
<div class="list-article-metadata">
<p class="categories">
<div class="card card-primary" id="post-<?php the_ID(); ?>">
<div class="card-header"><h1><?php the_title(); ?></h1></div>
<div class="article-meta">
<div class="article-category">
<?php $category = get_the_category();
echo"<a href= '" . esc_url( get_category_link( $category[0]->term_id ) ) . "' class='badge badge-blue badge-category'>" . $category[0]->cat_name . "</a>"; ?>
</p>
<p class="author-time"><?php the_time('j F Y') ?> par <?php the_author() ?></p>
</div>
<div class="list-article-content"><?php the_excerpt(); ?></div>
echo"<a href= '" . esc_url( get_category_link( $category[0]->term_id ) ) . "' class='article-category'>" . $category[0]->cat_name . "</a>"; ?>
</div>
<time itemprop="datePublished"><em><?php the_time('j F Y') ?></em></time>
</div>
</article>
<?php the_excerpt(); ?>
<p class="align-center"> <a href="<?php the_permalink(); ?>" title="<?php the_title();?>" class="btn btn-readmore">Lire l'article</a> </p>
</div>
<?php endwhile; ?>
<div class="navigation">
<?php the_posts_pagination(); ?>
</div>
<?php endif; ?>
<?php endif; ?>