fix: reparation foreach
This commit is contained in:
parent
60d1b31910
commit
de0f6d3fd3
1 changed files with 5 additions and 9 deletions
|
@ -20,13 +20,10 @@
|
||||||
'taxonomy' => 'roman',
|
'taxonomy' => 'roman',
|
||||||
'hide_empty' => false,
|
'hide_empty' => false,
|
||||||
)
|
)
|
||||||
);
|
);?>
|
||||||
|
|
||||||
// Check if any term exists
|
<?php if ( ! empty( $terms ) && is_array( $terms ) ) : ?>
|
||||||
if ( ! empty( $terms ) && is_array( $terms ) ) {
|
<?php foreach ( $terms as $term ) : ?>
|
||||||
// Run a loop and print them all
|
|
||||||
|
|
||||||
foreach ( $terms as $term ) { ?>
|
|
||||||
<article class="card card-preview card-primary">
|
<article class="card card-preview card-primary">
|
||||||
<a href="<?php echo esc_url( get_term_link( $term ) ) ?>" class="preview-link">
|
<a href="<?php echo esc_url( get_term_link( $term ) ) ?>" class="preview-link">
|
||||||
<div class="preview-item">
|
<div class="preview-item">
|
||||||
|
@ -47,9 +44,8 @@
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</article>
|
</article>
|
||||||
<?php }
|
<?php endforeach; ?>
|
||||||
}
|
<?php endif; ?>
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
|
Reference in a new issue