Support

Account

Home Forums General Issues Get Custom Taxonomy in Select Taxonomy Field Type with its Image

Solved

Get Custom Taxonomy in Select Taxonomy Field Type with its Image

  • Okay, so i have custom taxonomy and added custom image field using ACF.

    My question is, how can i get the name and image of the custom taxonomy using php function in the backend when i using the field groups?

  • There is not enough information in your question. Where exactly to you want to get this? What do you want to do with it? Name = name of the term or name of the image?

  • Sorry, previously I created a custom post type named “article” and a custom taxonomy (category) named “article layout” with a custom image field as the image for the layout created using ACF pro.

    Then, i created a custom field for the “article” custom post type, the field is a “taxonomy field” with select from the “article layout” custom taxonomy and save the single select as the category taxonomy.

    When i create or add a new article custom post, the custom taxonomy display the custom “article layout” name.

    My question is, how can i populate or add the custom image field in the “article layout” to the selection (instead only the name).

    I hope its understandable, and thank you for the reply.

  • A little more into

    In the filter

    
    $image = get_field('image-field-name', $term);
    

    and create the image tag following the image field doc

  • Cool, thank you very much, my bad for not checking for the documentation and resource.

    Thanks, once again for your help Mr. John.

  • Thank you for helping out.

  • Its really Helpful for all .

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.