• Resolved xyzpro

    (@xyzpro)


    Hi,
    I have created a custom post type and attached it to a Custom Taxonomy. I used Advanced Custom Fields to add an image upload option to taxonomy.

    But I can’t retrieve image in Front End. I used below code to get the image URL. But it is not working.

    /wp-content/uploads/<?php echo get_post_meta(get_ani_taxonomy_fields($ani->term_id, ‘acf_image_field_name’), ‘_wp_attached_file’, true); ?>” />

    How can I get this to work?

    Thanks in advance

Viewing 1 replies (of 1 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    I’m assuming that the ACF setup you used is probably setting the image information as term meta, and not post meta, so you would want to use get_term_meta() instead.

Viewing 1 replies (of 1 total)
  • The topic ‘How to get taxonomy image attached to a Post Type WordPress’ is closed to new replies.