Support

Account

Home Forums Front-end Issues Image field in taxonomy

Helping

Image field in taxonomy

  • Hello,

    I created taxonomy with ” custom post Type UI ” plugin. and I created the possibility to add an image linked to this taxonomy with ACF.

    But the problem is that I can’t display this image circled in red.

    I can’t find the code to use to display it on my template. I tried lot of things …

    Thanks in advance.

  • Take a look at this page: https://www.advancedcustomfields.com/resources/image/

    I’d set the return value of the custom image field to Image URL and put something like this in your template:

    <?php 
    $taxonomy_image_src = get_field('image_indicateur_confiance');
    
    if ($taxonomy_image_src) { ?>
    
        <img src = "<?php echo $taxonomy_image_src;?>">
    
    <?php } ?>
Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Image field in taxonomy’ is closed to new replies.