fix: reparation foreach

This commit is contained in:
Kazhnuz Klappsthul 2021-01-28 19:41:11 +01:00
parent 60d1b31910
commit de0f6d3fd3
1 changed files with 5 additions and 9 deletions

View File

@ -20,13 +20,10 @@
'taxonomy' => 'roman',
'hide_empty' => false,
)
);
);?>
// Check if any term exists
if ( ! empty( $terms ) && is_array( $terms ) ) {
// Run a loop and print them all
foreach ( $terms as $term ) { ?>
<?php if ( ! empty( $terms ) && is_array( $terms ) ) : ?>
<?php foreach ( $terms as $term ) : ?>
<article class="card card-preview card-primary">
<a href="<?php echo esc_url( get_term_link( $term ) ) ?>" class="preview-link">
<div class="preview-item">
@ -47,9 +44,8 @@
</div>
</a>
</article>
<?php }
}
?>
<?php endforeach; ?>
<?php endif; ?>
</div>
</main>