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)
- Errors while using ajax from external wordpress page
- Setting up widgets in wordpress with a unique ID for the after_title argument
- post expire after x days
- allow arabic letters when register new account
- How to get all events from ‘All in one Events calender’ plugin in JSON format?
- cURL error 60: SSL certificate problem: unable to get local issuer certificate
- How to Replace Words with Hypertext Link But Ignore Previously Existed Links?
- Bulk Image Uploader to create new post from each image [closed]
- Get direct children of custom taxonomy
- Make specific products accessible only to a user role in WooCommerce
- How to output wordpress custom tags separated by comma?
- Query all posts of a custom taxonomy term
- Custom form action to handle data inside a plugin
- WP Post Template – Templates in own folder
- Apple push notification doesn’t work
- Override Plugin Script Fucnction in WordPress
- Parse error: syntax error, unexpected ‘new’ (T_NEW) in /misc/41/000/204/381/9/user/web/ragami.net/wp-settings.php on line 219
- Ajax call returning 0
- How to upload WordPress Images to remote web server and display those images in WordPress gallery [closed]
- Conditional attributes and logic per product category
- Some code in shortcode function being ignored
- Subdomains with almost the same content
- Using window.onload with Ubermenu
- How to upload multiple files/images when developing a wordpress plugin?
- What is @Action in WordPress?
- How to include this jQuery File in wordpress?
- Copy taxonomy terms from one post to another programmatically
- Plugin that will let me specify a number of image sizes?
- How to make a dynamic css class whose name changes every visit to confuse scraper
- How to create plugin/ page that reads from database
- How to display registered customer list as dropdown in WooCommerce checkout?
- Error When Trying To Login [closed]
- Large amount image data transfer
- Get Image Having the ID [closed]
- Scrape a webpage for image and add it to post
- Echo out element to another page.
- Adding a Tag Parameter / Filter to My Shortcode
- Modify pages widget and make a plugin?
- Ajax call not working in wordpress through a plugin
- i need to make custom cron_schedule with custom interval time as a parameter into a custom payment gateway plugin wordpress
- Redirect unloggedin users
- Get all image in media Gallery with alt/title?
- WP Function does not trigger on Webhook API Call
- How to retrieve taxonomy Metabox fields in frontend
- Cookie value changes back to previous value after changing
- issue concerning ob_end_flush functions.php
- In a plugin, How to update a json file using ajax
- Do images in plugins automatically load?
- Can you add a shortcode to a custom post type that gets the post_title, post_content, etc. and then passes that to a plugin function?
- wp-admin/admin-ajax.php 400 (Bad Request) plugin
- How to echo a PHP Code After the Content
- Woocommerce list variations that are added already to cart in Single Product
- Update (a function) post’s featured image as soon as $image_url changes
- Social sharing plugin directing to blank page after post sharing
- How to order users alphabetically by name? in plugin UPME
- using href when creating wordpress plugin calls empty page instead of php file
- Media Playlist Plugin
- How to add php stylesheet to admin section instead of admin_head hook
- WordPress Background Audio – Continous AutoPlay
- Is there a way to add a custom input field for every taxonomy term in WP post editor?
- Displaying single Instagram images as a tile
- Replace Dash (-) and Underscore ( _ ) with Space
- How use Dynamic hyperlink on each wordpress post?
- How to execute init or woocommerce_init only for checkout page
- WordPress create permalink structure for custom post type with userid
- wordpress jquery is not defined because the head tag is empty
- How to change all the urls of the WordPress site?
- I want to allow certain file types on dokan upload files
- How to create different woocommerce single_product.php pages for each product? [closed]