Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Get the fields of the taxonomy term that this node is categorized under.
- $main_category_term_fields = field_fetch_field_values('node', $node, 'field_my_taxonomy_term');
- // Acquire the path to the image field on the taxonomy term (field_category_image).
- $image_path = $main_category_term_fields[0]['taxonomy_term']->field_category_image['und'][0]['uri'];
- // Use theme_image() to format the file path as a rendered image.
- $display_image = print theme_image(array('path'=>$image_path));
Add Comment
Please, Sign In to add comment