Not sure how useful this will be for folks and its pretty hacky and probably inefficient, you never know though it might come in handy.
I basically wanted to have this cool plugin be able to output (anywhere) the normal get_terms WP call but have the images added in.
Put this code in my functions.php
So in the theme call something like:
Will give an array like this:
Array (  => stdClass Object ( [term_id] => 261 [name] => Grass cutting [slug] => grass-cutting [term_group] => 0 [term_taxonomy_id] => 133 [taxonomy] => equipmenttypes [description] => [parent] => 0 [count] => 1 [img] => yourdomain/wp-content/uploads/category-images-ii/261.original.jpg [tmb] => yourdomain/wp-content/uploads/category-images-ii/261.thumb.jpg )
Same as the normal get_terms but with:
[img] => yourdomain/wp-content/uploads/category-images-ii/261.original.jpg
[tmb] => yourdomain/wp-content/uploads/category-images-ii/261.thumb.jpg
Might wanna change ln21 to ‘$terms = get_terms($tax,’hide_empty=0′);’ if you want to use this to show a panel of consistent options.
- The topic ‘[Plugin: Taxonomy Images II] Something i did for listing out arrays of terms with images’ is closed to new replies.