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/posts-list.php

19 lines
940 B
PHP
Raw Permalink Normal View History

2022-12-17 19:46:29 +01:00
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
2023-11-20 10:05:50 +01:00
<div class="card c-primary" id="post-<?php the_ID(); ?>">
2022-12-17 19:46:29 +01:00
<div class="card-header"><h1><?php the_title(); ?></h1></div>
<div class="flex-that mb">
<div class="article-category">
<?php $category = get_the_category();
2023-11-20 13:04:09 +01:00
echo"<a href= '" . esc_url( get_category_link( $category[0]->term_id ) ) . "' class='btn btn-small c-info'><svg class='icon' alt=''><use xlink:href='#icon-folder'></use></svg> " . $category[0]->cat_name . "</a>"; ?>
2022-12-17 19:46:29 +01:00
</div>
<time itemprop="datePublished"><em><?php the_time('j F Y') ?></em></time>
</div>
<?php the_excerpt(); ?>
<p class="align-center"> <a href="<?php the_permalink(); ?>" class="btn btn-readmore" title="<?php the_title();?>">Lire l'article</a> </p>
</div>
<?php endwhile; ?>
<div class="navigation">
<?php the_posts_pagination(); ?>
</div>
<?php endif; ?>