WPTemplate.com

How to Create Custom Taxonomy in WordPress

To create custom taxonomies that you can use in the WordPress plugins and themes, let us follow some simple steps. The significance of custom taxonomies is that it makes it possible to organize large chunks of matter in a systematic and logical sequence. There are two distinct categories in WordPress: multifaceted taxonomy and hierarchal taxonomy, which can be set up as tags. The content of taxonomy can be portrayed in themes by using different templates available as built-in taxonomy functions. These are the navigation menu, tags, categories and links.

 Custom Taxonomy

A new technique of organizing content allows the creation of your personalized custom taxonomies. You need to understand how all the settings may be configured. The task has been made easy by the core team who have innovated the function, register_taxonomy(). You can “register” or create a new taxonomy in WordPress from the options documented in WordPressCodex.

*http://codex.wordpress.org/Function_Reference/register_taxonomy

Once you have added some terms to the new taxonomy, start organizing the matter or content by location in your WordPress posts. The “Locations” box then shows up on the right side of your post in the admin area. This “location” can be used as the take-off point to start working with the various content and functions of taxonomy. You can portray the content of a custom taxonomy to your theme in WordPress. For example: taxonomy-{taxonomy}-{slug}.php

In case the taxonomy to be used is location, you will have to look for taxonomy-location.php in WordPress; taxonomy.php. The same template may be used for all types of custom taxonomies. When you come across a state that needs a structure for custom taxonomy, you could explore the Walker class or the function, wp_get_object_terms(). If you want to add a tag cloud taxonomy, use the function wp_tag_cloud(), which is an exciting way for people to view content.

Registering a taxonomy:

WordPress Custom Taxonomy Tutorial

Leave a Reply

Your email address will not be published. Required fields are marked *

two × two =

Scroll Up
1000's of Wordpress Templates at Great Prices: Visit ThemeForest