Created
June 15, 2011 02:29
-
-
Save mfields/1026364 to your computer and use it in GitHub Desktop.
Taxonomy Images Plugin Custom "get_the_terms" Loop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| * Use Taxonomy Images filter to get all speakers | |
| * associated with the current post. | |
| */ | |
| $speakers = apply_filters( 'taxonomy-images-get-the-terms', '', array( | |
| 'taxonomy' => 'category', | |
| ) ); | |
| /* | |
| * Loop over output. | |
| */ | |
| foreach( (array) $speakers as $speaker ) { | |
| print '<div class="speaker">'; | |
| /* Print taxonomy image. */ | |
| print wp_get_attachment_image( $speaker->image_id, 'thumbnail' ); | |
| // Do stuff from the other plugin here. | |
| // The $speaker var should hold all you need to get the meta. | |
| print '<pre>' . print_r( $speaker, true ) . '</pre>'; | |
| print '</div>'; | |
| } |
Author
i got it, 6 months ago would have asked why it didn't work.. now i am finally starting to understand what I am reading at least
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You might want to change the "taxonomy" argument to something other than "category" ... I might want to earn to proof-read things before I publish them :)