Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Get the taxonomy's terms
- $terms = get_terms(
- array(
- 'taxonomy' => 'brand',
- '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 ) {
- ?>
- <div class="uk-card uk-card-primary uk-card-body">
- <a href="<?php echo esc_url( get_term_link( $term ) ) ?>">
- <?php echo $term->name; ?>
- </a>
- <div>
- <img src="<?php the_field('logo');?>" alt="">
- </div>
- </div>
- <?php
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement