-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle.php
44 lines (40 loc) · 1.47 KB
/
single.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
get_header(); ?>
<main class="main-content">
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post(); ?>
<article class="post">
<header class="post-header">
<div class="container">
<figure class="post-header-illustration">
<?= wp_get_attachment_image( carbon_get_the_post_meta( 'cr_featured_image' ),
'post-header-img',
false,
[ 'class' => 'post-header-img' ] ) ?>
</figure>
<div class="post-header-content">
<h1 class="post-title"><?php the_title(); ?></h1>
<ul class="post-meta-list">
<li class="post-meta-item date">Article publié le <?php the_date(); ?></li>
<li class="post-meta-item quantity">dans <?php the_category(', '); ?></li>
</ul>
</div>
</div>
</header>
<section class="post-content">
<div class="container container-narrow">
<?php the_content(); ?>
</div>
</section>
</article>
<?php
}
} else { ?>
<p>Cet article n'existe pas.</p>
<?php
} ?>
</main>
<?php
get_footer(); ?>