feat: add a description custom field to articles

This commit is contained in:
Kazhnuz 2020-12-31 11:36:38 +01:00
parent 5c84704967
commit ab93b641de

View file

@ -17,6 +17,17 @@
<small class="author-date">Le <?php the_time('l j F Y à H:i') ?></small> <small class="author-date">Le <?php the_time('l j F Y à H:i') ?></small>
</div> </div>
</div> </div>
<?php
$custom_fields = get_post_custom();
$my_custom_field = $custom_fields['description'];
if ($my_custom_field != null) {
foreach ( $my_custom_field as $key => $value ) {
echo " <div class='card-body'> " . $value . "</div>";
}
}
?>
<div class="article-category"> <div class="article-category">
<?php $categories = get_the_category(); <?php $categories = get_the_category();
foreach( $categories as $category ) { foreach( $categories as $category ) {