[Feature Request] Get specific term image, not queried term image
-
Hi there,
My post title here is pretty self-explanatory: I’d like to be able to get the image associated with any taxonomy by specifying the taxonomy’s ID, not be being currently on the archive page of the taxonomy or whatever.
I’m not a big fan of the new “apply_filters everywhere” approach but at least it works.
Here’s my quick addition to get what I actually want:
function get_taxonomy_image($term_id, $size = 'post-thumbnail') { $associations = taxonomy_image_plugin_get_associations(); $image_id = absint( $associations[$term_id] ); return wp_get_attachment_image( $image_id, $size ); }
Once again, something similar should definitively make it to the plugin’s core.
Thansk for your great work.
Jeremy
- The topic ‘[Feature Request] Get specific term image, not queried term image’ is closed to new replies.