feat: add a description custom field to articles
This commit is contained in:
parent
5c84704967
commit
ab93b641de
1 changed files with 11 additions and 0 deletions
11
single.php
11
single.php
|
@ -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 ) {
|
||||||
|
|
Reference in a new issue