FIX Conditionnal display of tags to avoid empty vertical space when no tags

This commit is contained in:
Nonimart 2025-06-25 11:44:45 +02:00
parent f37f9cca3a
commit 435eb4f218

View File

@ -4,9 +4,11 @@ $articleContent = get_the_content($articleID);
$articleTitle = get_the_title($articleID);
$citeReference = get_field('cite_reference', $articleID);
$tags = get_the_terms($articleID, 'etiquettes');
?>
<article class="article-content">
<?php if ($tags) : ?>
<ul class="article-tags-list">
<?php foreach ($tags as $tag) : ?>
<li class="article-tag">
@ -14,7 +16,10 @@ $tags = get_the_terms($articleID, 'etiquettes');
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<?php the_content(); ?>
<?php if ($citeReference) : ?>
<p id="cite-reference">
<?php echo $citeReference; ?>