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.
kspace-wordpress-theme/single.php

34 lines
1.1 KiB
PHP

<?php get_header(); ?> <!-- ouvrir header,php -->
<main class="col-md-8">
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
<article class="article" id="post-<?php the_ID(); ?>">
<h1 class="page-title"><?php the_title(); ?></h1>
<div class="article-entry">
<?php the_content(); ?>
</div>
<section class="card card-noheader">
<div class="author-area">
<? 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>
<?php $categories = get_the_category();
foreach( $categories as $category ) {
echo "<a href= '" . esc_url( get_category_link( $category->term_id ) ) . "' class=''>" . $category->cat_name . "</a>";
} ?>
</section>
</article>
<?php comments_template(); ?>
<?php endwhile; ?>
<?php endif; ?>
</main>
<?php get_sidebar(); ?>
<?php get_footer(); ?>