FIX Conditionnal display of tags to avoid empty vertical space when no tags
This commit is contained in:
parent
f37f9cca3a
commit
435eb4f218
|
|
@ -4,17 +4,22 @@ $articleContent = get_the_content($articleID);
|
||||||
$articleTitle = get_the_title($articleID);
|
$articleTitle = get_the_title($articleID);
|
||||||
$citeReference = get_field('cite_reference', $articleID);
|
$citeReference = get_field('cite_reference', $articleID);
|
||||||
$tags = get_the_terms($articleID, 'etiquettes');
|
$tags = get_the_terms($articleID, 'etiquettes');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<article class="article-content">
|
<article class="article-content">
|
||||||
<ul class="article-tags-list">
|
<?php if ($tags) : ?>
|
||||||
<?php foreach ($tags as $tag) : ?>
|
<ul class="article-tags-list">
|
||||||
<li class="article-tag">
|
<?php foreach ($tags as $tag) : ?>
|
||||||
<?php echo $tag->name; ?>
|
<li class="article-tag">
|
||||||
</li>
|
<?php echo $tag->name; ?>
|
||||||
<?php endforeach; ?>
|
</li>
|
||||||
</ul>
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php the_content(); ?>
|
<?php the_content(); ?>
|
||||||
|
|
||||||
<?php if ($citeReference) : ?>
|
<?php if ($citeReference) : ?>
|
||||||
<p id="cite-reference">
|
<p id="cite-reference">
|
||||||
<?php echo $citeReference; ?>
|
<?php echo $citeReference; ?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user