Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've created a custom Taxonomy for a Custom Post Type, and created five or so terms within the taxonomy.

I've created a single image upload and assigned it to the custom taxonomy, and uploaded images for each term.

I can't for the life of me figure out how to get the image to display. I've var_dumped the term but there's nothing in there about the image?

Any help much appreciated!

WP version: 3.4.2 ACF version: 3.5.3.1

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

As per the plugin documentation:

The second parameter needed is a string in the format “$type_$id”.

// get value from a taxonomy (taxonomy = "category", id = 3)
$value = get_field('field_name', 'category_3');

// get value from a taxonomy (taxonomy = "events", id = 76)
$value = get_field('field_name', 'events_76');
share|improve this answer
    
Brilliant thank you! Had only been looking at the image docs!! –  lucirebecca Nov 25 '12 at 16:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.