This repository has been archived on 2023-11-30. You can view files and clone it, but cannot push or open issues or pull requests.
qdouze-wordpress-theme/single.php

50 lines
1.9 KiB
PHP
Raw Normal View History

2018-10-24 17:55:22 +02:00
<?php get_header(); ?> <!-- ouvrir header,php -->
<main class="col-md-8">
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
<article class="article-content" id="post-<?php the_ID(); ?>">
2018-10-24 18:06:20 +02:00
<h1 class="page-title"><i class="fa fa-fw fa-file-text"></i> <?php the_title(); ?></h1>
2018-10-24 21:07:40 +02:00
<aside class="article-metadata">
<div class="article-thumbnail" ><?php the_post_thumbnail(); ?></div>
<aside class="card card-darker article-author bypass-flex-fontsize">
2018-10-25 18:25:31 +02:00
<div class="media card-meta">
<div class="media-left"> <? echo get_avatar( get_the_author_meta('user_email'), $size = '50'); ?></div>
<div class="media-body"><author class="media-heading">Écrit par <?php the_author() ?></author><time> Le <?php the_time('l j F Y à H:i') ?> </time></div>
</div>
</aside>
<div class="article-excerpt"><?php the_excerpt(); ?></div>
2018-10-24 21:07:40 +02:00
2018-10-25 18:03:06 +02:00
<section class="article-taxonomies">
<div class="article-categories article-taxonomies-container">
<?php $categories = get_the_category();
foreach( $categories as $category ) {
echo "<a href= '" . esc_url( get_category_link( $category->term_id ) ) . "' class='badge badge-category'>" . $category->cat_name . "</a>";
} ?>
</div>
<div class="article-tags article-taxonomies-container">
<?php $tags = get_the_tags();
if ($tags) {
foreach( $tags as $tag ) {
echo "<a href= '" . esc_url( get_tag_link( $tag->term_id ) ) . "' class='badge badge-tag'>" . $tag->name . "</a>";
}
} ?>
</div>
</section>
2018-10-24 21:07:40 +02:00
<hr />
</aside>
2018-10-24 17:55:22 +02:00
<div class="article-body">
<?php the_content(); ?>
</div>
</article>
<?php comments_template(); ?>
2018-10-24 17:55:22 +02:00
<?php endwhile; ?>
<?php endif; ?>
</main>
<?php get_sidebar(); ?>
<?php get_footer(); ?>