Home › Forums › Front-end Issues › Display image › Reply To: Display image
You’re not using the correct id for the field
<?php
$args = array(
'hide_empty' => 0,
'parent' => 0,
);
$terms = get_terms( 'taxonomy_ascenseur', $args );
if (!empty($terms) && !is_wp_error($terms)) {
echo '<ul>';
foreach ( $terms as $term ) {
echo '<li><img src="'.
the_field('image_categorie', 'taxonomy_ascenseur_'.$term->term_id).
'"/>'.$term->name.'</li>';
}
echo '</ul>';
}
?>
In the future you should not reply to your own question. Doing so takes it off the list of question that need a reply so it looks like someone is already helping you. Bumping questions won’t get them answered faster and doing so will hurt your chances of getting a reply.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.