What is: Terms
In WordPress, terms refers to the items in a taxonomy.
For example, a website has categories books, politics, and blogging in it. While category itself is a taxonomy the items inside it are called terms.
Before the custom taxonomies were introduced, WordPress had template tags to display tags and categories. With the introduction of custom taxonomies, template tags were introduced to handle display of terms inside custom taxonomies. Template tags for terms can also be used for categories or tags, which are default taxonomy built-in to WordPress as standard.
Functions related to the terms, such as the_terms() function will display the terms inside of a custom taxonomy within WordPress. The parameters of the_terms() Function allow the user to format them to make the information presentable. The following is an example of the_terms() function:
<?php the_terms( $post->ID, 'category', 'categories: ', ' / ' ); ?>
Terms within custom taxonomies can also be displayed using short code, widgets, and other means, depending on how the site is setup. The above code is for displaying it using hard code through PHP. The hard coded way may be more convenient for custom designed websites, whereas the widgets and plug-ins method may be more useful for pre-designed WordPress Templates being used by multiple websites. The plugin and short code option also gives the admins who are not as tech savvy an easier method of implementation and control of displaying terms within the custom taxonomies. To initially setup the short code, some hard coding into the WordPress files still has to be done. Please see the related articles below for further detail on this.
- Template Tag
- How to Display Custom Taxonomy Terms in WordPress Sidebar Widgets