Taxonomy Thumbnail

Taxonomy Thumbnail

Wordpress plugin

Install on Wordpress

App Details

This plugin is meant for developers, it allows to attach a thumbnail to taxonomy terms.

UI for setting the thumbnails

The thumbnail can be added on term creation or later on the term edition page.
The terms list has a column displaying the current thumbnail (so far, no specific action here).
The plugin uses the “new” media window (the one used since WP 3.5), not the old thickbox.
I made some extra efforts to enhance accessibility. I’m not an a11y expert but the UI is not only a “Add thumbnail” button. For instance, the new wp.a11y.speak() is used when available. Please give me feedback if you think it can be improved.
Works with or without JavaScript.
If JavaScript is enabled, thumbnails are set via ajax in the term edition window, no need to update the term.
By default, the UI is displayed for all public taxonomies, but this can be filtered that way:

add_filter( 'sftth_taxonomies', 'my_taxonomies_with_thumbnail' ); function my_taxonomies_with_thumbnail( $taxonomies ) { unset( $taxonomies['post_tag'] ); $taxonomies['my_custom_tax'] = 'my_custom_tax'; return $taxonomies; } 

Template tags

Find them in inc/template-tags.php.
Important note: for WP 4.4+, these functions use term_id. For WP < 4.4, they use term_taxonomy_id.
I tried to mimic the post thumbnail functions:

  1. get_term_thumbnail_id( $term_id ): Retrieve term thumbnail ID.
  2. has_term_thumbnail( $term_id ): Check if a term has a thumbnail attached to it.
  3. the_term_thumbnail( $term_id, $size = 'post-thumbnail', $attr = '' ): Display the term thumbnail.
  4. get_term_thumbnail( $term_id, $size = 'post-thumbnail', $attr = '' ): Retrieve the term thumbnail.
  5. set_term_thumbnail( $term_id, $thumbnail_id ): Set a term thumbnail.
  6. delete_term_thumbnail( $term_id ): Detach a thumbnail from a term.

Store the data

From WordPress 4.4, the term metas API is used.
Below WordPress 4.4, there are two ways to store the thumbnail IDs:

  1. Use term metas with the plugin Meta for Taxonomies.
  2. Use an option (an array association of term_taxonomy_id => thumbnail_id integers). The option name can be customized by defining the constant SFTTH_OPTION_NAME in wp-config.php.

Get terms

Use get_terms() with a specific parameter to retrieve only terms with a thumbnail:

$terms = get_terms( array( 'with_thumbnail' => true, ) ); 

From WordPress 4.4, you can also use a small helper to build your meta query:

$terms = get_terms( array( 'meta_query' => array( 'relation' => 'AND', array( // Any meta query. ), sftth_meta_query(), ), ) ); 

Below WordPress 4.4, if you use the plugin Meta for Taxonomies, you should always cache thumbnails.
When using 'with_thumbnail' => false you will retrieve all terms, even those without a thumbnail, but the thumbnails will be cached, saving calls to the database later:

$terms = get_terms( array( 'with_thumbnail' => false, ) ); 

Uninstall

When uninstalling the plugin, you can decide to not delete the thumbnails, simply define a constant in wp-config.php:

define( 'SFTTH_KEEP_DATA', true ); 

Translations

  • US English
  • French

Requirements

Should work starting from WP 3.5, but tested only in WP 4.2.2+ so far.

Credits

Photo used for the banner by Nicolas Janik (CC BY 2.0).

Pricing

Starting from $0 per month.

Check Out the Feedback Popup Widget

By Common Ninja

Feedback PopupTry For Free!

App Info

Rating

Reviewers

10 reviews

Tags

category
dev
image
taxonomy
thumbnail

Developed By

Grégory Viguier

Quick & Easy

Find the Best Wordpress plugins for you

Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!

Testimonial

Testimonial plugins for Wordpress

Galleries

Galleries plugins for Wordpress

SEO

SEO plugins for Wordpress

Contact Form

Contact Form plugins for Wordpress

Forms

Forms plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Sliders

Sliders plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Comments

Comments plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Maps

Maps plugins for Wordpress

Security

Security plugins for Wordpress

Translation

Translation plugins for Wordpress

Ads

Ads plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Music Player

Music Player plugins for Wordpress

Backup

Backup plugins for Wordpress

Privacy

Privacy plugins for Wordpress

Optimize

Optimize plugins for Wordpress

Chat

Chat plugins for Wordpress

Countdown

Countdown plugins for Wordpress

Email Marketing

Email Marketing plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Membership

Membership plugins for Wordpress

popup

popup plugins for Wordpress

SiteMap

SiteMap plugins for Wordpress

Payment

Payment plugins for Wordpress

Coming Soon

Coming Soon plugins for Wordpress

Ecommerce

Ecommerce plugins for Wordpress

Customer Support

Customer Support plugins for Wordpress

Inventory

Inventory plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Testimonials

Testimonials plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Slider

Slider plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Membership

Membership plugins for Wordpress

Forms

Forms plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Contact

Contact plugins for Wordpress

Comments

Comments plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Common Ninja Apps

Some of the best Common Ninja plugins for Wordpress

Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.

Feedback Popup for Wordpress logo

Feedback Popup

Collect user insights with a feedback popup that reveals issues early, improves user experience, and captures valuable leads through a clear feedback form.

Card Builder for Wordpress logo

Card Builder

Add customizable content cards to your site to display structured information clearly with flexible layout and design options.

Instagram Slider for Wordpress logo

Instagram Slider

Add an Instagram slider to your site to display social posts dynamically and keep your visual content engaging and current.

Business Listings for Wordpress logo

Business Listings

Create business listings with a listings widget that presents companies clearly, supports easy organization, and helps visitors find the right services quickly.

Ratio for Wordpress logo

Ratio

Create interactive infographics with a ratio widget that uses custom icons, dynamic tooltips, and clear visuals to help visitors understand data quickly.

Agenda for Wordpress logo

Agenda

Add an event agenda to your site to display schedules clearly, helping users understand timing and plan their attendance.

Countdown for Wordpress logo

Countdown

Add a countdown timer to your site to highlight upcoming events or launches and encourage timely user action.

Threads Feed for Wordpress logo

Threads Feed

Show Threads posts in a live feed that keeps content fresh, builds social proof, and helps visitors engage on your site.

Skill List for Wordpress logo

Skill List

Showcase your abilities with a structured skill list that highlights strengths clearly, builds credibility, and improves your chances of getting hired.

Facebook Feed for Wordpress logo

Facebook Feed

Show Facebook posts in a live Facebook feed that keeps content fresh, boosts social proof, and helps visitors engage more with your brand.

Podcast Player for Wordpress logo

Podcast Player

Add a podcast player to your site to embed and organize episodes, provide responsive playback, and keep listeners engaged.

Skill Flip Cards for Wordpress logo

Skill Flip Cards

Use skill flip cards to showcase your abilities in a clear, interactive format that strengthens your profile and improves your chances of getting hired.

More plugins

plugins You Might Like

Discover Apps By Platform

Discover the best apps for your website

WordPress
Wix
Shopify
Weebly
Webflow
Joomla
PrestaShop
Shift4Shop
WebsiteX5
MODX
Opencart
NopCommerce

Common Ninja Search Engine

The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!

Multiple platforms