I was having trouble with this too. Wanted to show all the term images on a single post page. I found that you need to loop through the terms first (in my case, taxonomy=st_colors), then loop through the images associated with those terms. Here is how I solved it:
<?php
$terms = get_the_terms( $post->ID, 'st_colors' );
foreach ($terms as $term) :
$colors = apply_filters( 'taxonomy-images-get-terms', '', array(
'taxonomy' => 'st_colors',
'term_args' => array(
'slug' => $term->slug,
)
)
);
foreach( (array) $colors as $color) :
echo wp_get_attachment_image( $color->image_id, 'full', array('class' => 'alignnone'));
echo $term->name;
endforeach;
endforeach;
?>
Hope that helps!
Related Posts:
- Cropping, Re-sizing and Saving images from one folder to another folder in wordpress
- Rename existing old uploaded images containing accented French characters (not during upload)
- Get product attribute for Simple product in WooCommerce
- How to show category images (from plugin) on a regular page (page-example.php)?
- Getting media library popup in custom plugin admin page
- bulk change of image setting “link to” to “link to: image url “
- How to generate video out of images via WordPress plugin
- Limit Number of Taxonomy Terms (Images) Displayed
- Want wp_get_post_terms return in arbitrarily order, how to do?
- List taxonomy terms for post as checkboxes
- Ordering taxonomies by rank
- Redirect to another page using contact form 7? [closed]
- WordPress custom taxonomy not showing
- Where to populate custom terms in custom taxonomy in plugin?
- wp_insert_term() doesnt insert a term
- Smarter navigation plugin and custom taxonomies
- Offer Download Links for Product Images
- Get product categories and add them to a custom taxonomy
- WP_get_image_editor resizing images in a foreach loop
- Only return taxonomies that are linked to a category & product
- Why is my custom taxonomy image not displaying?
- Show custom taxonomy in theme
- Get only selected custom taxonomy
- Get custom term link archive with prefix
- resizes images on the fly
- Add “selected” class to custom taxonomy dropdown search
- export high ress images to pdf
- Save selectlist value (taxonomy) in wp:wp_set_object_terms
- Award points if a specific custom taxonomy is selected – Cubepoints
- how to add “alt” for all image in wordpress
- Allow users to download media files directly from Amazon S3 (AWS plugin)
- Create a custom taxonomy’s term form
- How to redirect Old Post URL to new Post and keep Old post Comments?
- How to change Thumbnail size of next Gen Gallery plugin?
- Escape special characters in image link
- taxonomy_template filter do not loads custom taxonomy template properly
- Dashboard Widget Form
- Why Better WP security plugin returns 418 I’m a Teapot “error”?
- Modifying Footnote Plugin for Descriptive Title Attributes
- I would like to use create a function in my custom plugin to tell WP to use a different header
- New Plugin: Post update pushes a copy as a revision
- How to edit/delete single row items in a table on my own menu page
- How to remove the whitespace in image name and save the new file
- Overide a function that is inside a plugin
- Plugin allowing for artists, events and venues
- Uncaught Error: Call to undefined function get_user_by() after moving function from theme to plugin
- Sort products without thumbnail in WooCommerce shop page
- Create or Update thousands of woocommerce products via PHP
- cURL error 60: SSL certificate problem: unable to get local issuer certificate
- How to get images from EDD post?
- Can’t get custom posts of taxonomy to show
- How to add pagination to wpbakery grid?
- How to change ID of an attachment in wp_posts and its related tables correctly?
- How to Replace Words with Hypertext Link But Ignore Previously Existed Links?
- send_headers don’t work on wordpress multisite
- Can’t create term for product attribute
- Add multiple attributes to product from php
- Cannot run the code after I activate the plugin
- How do I create a full-bleed background image on text mouseover? [closed]
- jQuery function didn’t work in my plugin
- Displaying admin notice dynamically
- Can I check plugins and themes for PHP 5.6 ahead of global PHP server Update
- How to add rewrite rules and pagination to retrieve attachments files?
- custom taxonomy and custom post type url conflict
- Displaying Gravity Form data on WordPress page [closed]
- Converting Attachment to Images?
- Improving a Stackoverflow “inspired” badge system to display badges in author page
- Get a list of galleries from an album in NextGEN Gallery [closed]
- Bulk Image Uploader to create new post from each image [closed]
- How to install and activate a plugin via an external PHP script
- how to include a simple jquery file into a wordpress plugin
- Calling a plugin in theme development
- Display a text message if the field is not found and not if found
- Regenerate images with automatic ALT and TITLE attributes
- Unable to activate wordpress importer after installing it
- Get direct children of custom taxonomy
- Reposition Woocommerce Message
- Sanitizing, Validating and Escaping in WordPress (Plugin)
- Get total number of comment of the posts written by an author
- Is it possible to insert images directly from the server?
- How do you remove plugin edit option?
- How to add a random image to a post from gallery and only show one?
- Get the url of the full sized attachment image using post ID?
- Escape when echoed
- Scope for PHP Variables Assigned in functions.php or a plugin
- add_meta_box (Will display only in specific page admin WordPress)
- Make specific products accessible only to a user role in WooCommerce
- How to add css class to a specific set of images?
- force customers to add only single item to card per purchase EDD [closed]
- Undefined property: WP_Post_Type::$ID
- Plugin exceeds memory limit
- How to get post URL in the_content filter?
- How to remove xmlns on language_attributes()?
- How to write one comment and publish on every post using database or plugin?
- How do I make images clickable so as to enlarge them using lightbox?
- Add a plugin before main container
- Shortcode to generate and save password in a file
- How to get subscription key or id using Woocommerce Subscriptions [closed]
- How to output wordpress custom tags separated by comma?
- How to get member list based on role by using buddypress?