FEATURE Affichage des termes de taxo dans l'ordre parents > enfants
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ef2d6a9363
commit
b6bbcf33d5
|
|
@ -6,8 +6,8 @@ $post_permalink = get_the_permalink($postID);
|
|||
$company_members = get_field('company_members', $postID);
|
||||
|
||||
$elementsBatimentsTerms = get_the_terms($postID, 'elementsbatiments');
|
||||
$metiersTerms = get_the_terms($postID, 'metiers');
|
||||
|
||||
// $metiersTerms = get_the_terms($postID, 'metiers');
|
||||
$metiersTerms = get_the_terms_organised_by_parent('metiers', $postID); // From utilities.php
|
||||
|
||||
$hasEmptyTaxos = (empty($elementsBatimentsTerms) && empty($metiersTerms)) ? 'card-taxonomies--empty' : '';
|
||||
?>
|
||||
|
|
@ -35,7 +35,7 @@ $hasEmptyTaxos = (empty($elementsBatimentsTerms) && empty($metiersTerms)) ? 'car
|
|||
</div>
|
||||
<div class="taxonomy-tags card-taxonomies__taxonomy-tags">
|
||||
<?php foreach ($metiersTerms as $key => $term) : ?>
|
||||
<span class="taxonomy-tag"><?php echo $term->name; ?></span>
|
||||
<span class="taxonomy-tag taxonomy-tag--<?php echo $term->parent === 0 ? 'parent' : 'child'; ?>"><?php echo $term->name; ?></span>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user