Support » Plugin: Custom Post Type UI » How to get taxonomy image attached to a Post Type WordPress

  • 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 Author 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)
  • You must be logged in to reply to this topic.