Taxonomy Images Plugin – Moving Forward

Posted on

By Michael Fields

Development on the next version of the Taxonomy Images plugin is underway. I’ve completely rewritten the plugin taking many things into consideration. But I would like to get your feedback on how you use this plugin. Associating images to terms of taxonomies is a rather straight forward thing. What users actually do with these associations is another thing all together!

Check out the progress! Hosted by Github

What I use it for

The reason I originally made the plugin was to associate images with each symbol in my art portfolio. Symbol is a custom taxonomy that I use to organize the different drawings and paintings. I felt that it was easier to show visitors what the symbol looked like rather than just rely on text. So I created the Taxonomy Images plugin to provide this functionality.

What I have realized is that my application of this plugin may or may not apply to how others use it or expect it to work. There have been many questions about how to accomplish certain tasks that are outside the scope of functionality provided in past versions. One of the goals in version 0.7 is to provide as many low level functions to allow easy access to the associations create by this plugin.

What You Can Do to Help

Basically, I would like to know/see how you are using the plugin. And perhaps answer a few of the following questions. Any help is greatly appreciated! FYI, this plugin is free and released under the GPLv2.

Please leave a comment on this post or feel free to contact me directly. The information is on my about page.

A Few Questions

  • How do you use term images in your theme?
  • What taxonomies do you images with?
  • Can you answer this question?
  • What limitations have you found with the current version (0.5)

9 Comments Leave a comment

  1. Rarst May 21, 2011 at 10:44 pm

    >How do you use term images in your theme?

    I use simple look up by term slug for matching image in dedicated icons folder. See archives page at my blog http://www.rarst.net/archives/

    > What taxonomies do you images with?

    Native – tags, categories.

    >Can you answer this question?

    Not at the moment, too sleepy. :)

    Also I think this is very close to topic of object relationships. If you are strongly interested in it please consider going through this trac ticket and contacting Mike Schinkel about his development proposal http://core.trac.wordpress.org/ticket/14513#comment:77

  2. Michael Fields May 21, 2011 at 11:04 pm

    Thanks for the link. That’s a pretty nice archive page! This is pretty much how I would be using them on this site too, If I had images to apply to my terms, that is (I think I only have one thus far that shows at the top of the term archive ).

    This is pretty close to Mike’s proposal, I could definitely leverage something like that (if it existed) to accomplish many of the things that this plugin solves. Would love to see reciprocal post relationships in core someday. Until then posts2posts does a great job when needed!

  3. Rachel Nabors May 22, 2011 at 4:14 am

    My site: http://rachelthegreat.com

    How do you use term images in your theme?
    I use it on the comic archive page and to list the cast members on the sidebar. Your plugin makes it possible.

    I also used another one of your plugins in my functions file to list and paginate the archives. Is brilliant.

    What taxonomies do you use images with?
    Character and storyline taxonomies. It helps users find both if I show them a visual in addition to text.

    What limitations have you found with the current version (0.5)
    I wish this worked with wp_list_terms().

  4. Michael Fields May 22, 2011 at 1:12 pm

    Hi Rachel! Thanks for your feedback. Characters is a great use of this plugin! I can’t say that I understand how the storylines taxonomy works, but am to learn :)

    If you’re talking about the Taxonomy List Shortcode plugin, I’m currently working on reworking that so that it integrates well with Taxonomy Images. Taxonomy Images used to have a shortcode, but I pulled it out so that the functionality could be better handled in the shortcode plugin. A few people really like the paging and IMO it’s probably a good idea not to repeat the code. Currently, I have three templates in the Taxonomy List Shortcode plugin:

    • Index – Original layout with columns. example
    • Definition List – Displays terms and descriptions as a definition list -> only displays terms that actually have a description. example
    • Gallery – Produces very similar markup as the core gallery shortcode. Displays only terms that have an associated image (via Taxonomy Images plugin) and uses the term name as the image’s caption.

    It will be coded in such a way that you can just copy the templates from the plugin into your theme and the plugin will use the one from the theme instead. I am planning to add at least one more template before release. Kind of a mix of definition list and gallery. If you have any ideas on other templates to include that would work well with images, feel free to let me know!

    I couldn’t find wp_list_terms() did you mean get_the_term_list() or something else? I’m working on functionality for get_the_term_list() at the moment. It’s a bit involved for use on archive pages, but I’ll do my best to find a responsible solution.

  5. Rachel Nabors May 22, 2011 at 7:28 pm

    Yes, I meant get_the_term_list();. Sorry! I have been at WordCamp Raleigh all weekend (so tiiiiiired–but I got to give a talk on security!).

    Let me show you what I’m up to on http://rachelthegreat.com/comics

    “comic” is a custom content type. It can be added to one custom hierarchical taxonomy, comics_stories. That would be the title of the storyline, like “Christmas Special,” and the term’s description, “Rachel and Tuna take off for the holidays in this hilarious comic,” is used on the archive page along with the term title itself.

    The trick was to do the following:

    Associate and image with the term, for which I use your custom taxonomy images plugin.
    List the taxonomy terms with their descriptions.
    Have the associated images show in that list.
    Have the titles and images link to the first page under their term (they actually link to the taxonomy term’s archive page which I have set to 301 redirect to the first post in the loop–not pretty, but I couldn’t find a less intensive way. Please let me know if you have heard of anything.)
    Paginate the list in 10′s.

    I searched high and low for a solution and ended up with two plugins made by the same person, you. You’re the only person who was working with this (terribly useful) functionality.

    To list the different storylines, I installed your beta taxonomy images plugin, but I needed to make heavy, heavy mods to your Taxonomy List Shortcode plugin. After a brief discussion with you online, I determined to absorb it into my functions.php file and make those edits. If you’d like to have a look, let me know and I can send you a copy.

    Then I put this in my archive-comic.php template:

    One word: Personally, I would love it if you could allow the markup to be determined on the theme developer’s end somehow. I have very specific layout/markup needs, wrapping images and terms in links and the like. So when you release your next plugin I will probably have to heavily modify it again or keep using this.

  6. Rachel Nabors May 22, 2011 at 7:30 pm

    Sorry, it filtered the code:


    echo do_shortcode("[taxonomy-list tax='comics_stories' per_page='10']");
    //start paginating taxonomy http://michaeldozark.wordpress.com/2010/03/03/turn-any-shortcode-into-a-template-tag/

  7. Michael Fields May 22, 2011 at 8:25 pm

    Yes, I meant get_the_term_list();. Sorry! I have been at WordCamp Raleigh all weekend (so tiiiiiired–but I got to give a talk on security!).

    Sweet! Hope the talk went well saw your avatar in the speaker list on Twitter earlier today. get_the_term_list() functionality will be included in the next version. Just needed to wrap my head around some specifics as it’s use could result in A LOT of queries being produced … explanation on Stack Exchange.

    “comic” is a custom content type. It can be added to one custom hierarchical taxonomy, comics_stories. That would be the title of the storyline, like “Christmas Special,” and the term’s description, “Rachel and Tuna take off for the holidays in this hilarious comic,” is used on the archive page along with the term title itself.

    Right on. That makes sense now. Sometimes I need an explanation for things. This is part of the reason I wrote this post: to have a better understanding of how people use this functionality with their data. The characters taxonomy made perfect sense to me and now so does the story line! Thanks.

    Associate and image with the term, for which I use your custom taxonomy images plugin. List the taxonomy terms with their descriptions. Have the associated images show in that list. Have the titles and images link to the first page under their term (they actually link to the taxonomy term’s archive page which I have set to 301 redirect to the first post in the loop–not pretty, but I couldn’t find a less intensive way. Please let me know if you have heard of anything.)

    This is probably what was confusing me, honestly. I saw that the links went straight to the single template. Had no idea that they were redirecting. A similar thing that I have done in the past was to set the taxonomy archive pages to display only one post per page via query_posts(). This allowed for faux-single views where the paging applies only to the taxonomy being queried. Might be an acceptable solution.

    Personally, I would love it if you could allow the markup to be determined on the theme developer’s end somehow. I have very specific layout/markup needs, wrapping images and terms in links and the like. So when you release your next plugin I will probably have to heavily modify it again or keep using this.

    Awesome! That’s totally the direction that the shortcode plugin is moving. You can see the development on Github at the moment. It’s not really ready for release, but I’m using it on my site currently. Each template that I listed in the above comment has it’s own template file:

    1. taxonomy-list-shortcode-index.php
    2. taxonomy-list-shortcode-definition-list.php
    3. taxonomy-list-shortcode-gallery.php

    If users need to customize the display of these templates, they can just copy theme from the plugin into their theme and modify the code to their hearts content. I think that this is definitely the best route to go as a plugin developer. The template files can exist in the theme (where they belong) and all the functionality exists in the plugin (where it belongs). If the plugin is ever uninstalled, then the template files will never be included by WordPress so any custom functions used in them will not produce errors in the website. I think it’s a win-win. Hope it works out. Would love it if you could help run some tests before release. I appreciate all your support thus far and definitely would not want to a new release of these plugins to break your site (really ANY site for that matter).

  8. Rachel Nabors May 22, 2011 at 9:20 pm

    Yes, please let me know how I can assist you!

    This is probably what was confusing me, honestly. I saw that the links went straight to the single template. Had no idea that they were redirecting. A similar thing that I have done in the past was to set the taxonomy archive pages to display only one post per page via query_posts(). This allowed for faux-single views where the paging applies only to the taxonomy being queried. Might be an acceptable solution.

    I considered that but I think I ran into pagination issues and also, from an IA perspective, that means that the storyline’s “archive page” would be identical to its “first page”. This makes the site structure way more redundant from an analytics/search engine perspective, and thus I opted for clunky redirects.

    Some day I might want to do something special with those archive pages. But they seem to be meeting user expectations just fine as is: Click link, start story.

  9. Daniele December 23, 2011 at 11:24 am

    Thanks MIcheal for this great plugin. The integration of taxonomies images in the wordpress media system is perfect. Perfect both from the end-user and the developer perspective.
    I agree on your choice of filters to add images to the queries (as you nicely have explained in a forum thread on wordpress.org) and the way you stored the associations is another great thing: really easy to get and use.

    keep up the good work!

    Daniele

Share your thoughts

Fork me on GitHub