Wordpress TaxonomyWorldpress Taxonomy
Is a taxonomy? The taxonomy is one of those words that most humans never listen to or use. A taxonomy is essentially a way of summarizing things. That is something most humans meet in biological education, and it is known as the Linnaean Taxonomy. Texts for the different groups in a taxonomy are referred to as notions.
Contributions usually have a large number of labels, and they are usually shown near contributions or in the shape of Tagclouds.
With the taxonomy "link_category" you can categorise your link. You cannot create new mail types or add them to the standard ones. Matt' s Community Tags uses taxionomies to specify "humans" as taxonomy for appendices. It uses it to allow users to tag people's name on images, and with it its website can show images of users under the URL'/person/name'.
In order to use a taxonomy, use the register_taxonomy() command. Here is an example for the registration of a "people" taxonomy: "people", "post", "label" => __('People' ),'rewrite' => array('slug' =>'person'),'assign_terms' =>'edit_guides','edit_terms' =>'publish_guides' ); add_action('init','people Here_init' ); the taxonomy "people" is define. It' is designed to work for postings, and a write slot is designed to turn the web address into '/person/' instead of '/people/'.
This allows any of the users with the edit_guides function to associate the taxonomy with a contribution, and any of the users with the publish_guides function to generate new taxonomy elements. The taxonomy functions of the taxonomy comprise: assign_terms, edit_terms, manage_terms to display the taxonomy in the administration nav iagation, and delete_terms. Here, you can With this new meta-box you can almost look exactly like the tag boxes and tag these postings.
You may not have the taxonomy interfaces built for you if you do not attach your taxonomy to contributions. After all, you can define one for each type of item. In order to use your taxonomy to append words to an item, you must use the command wp_set_object_terms(). Here is an example of how to append the word "Bob" to the postal ID number 123 in the taxonomy "Person": wp_set_object_terms( 123, 'Bob', 'Person'); as you can see, it's easy to do.
You can also use the second parameters as a set of words that can be added at once, if necessary. You can also use the wp_tag_cloud() command to specify a "taxonomy" if you want to show a cluster of words for your user-defined taxonomy. When you want to have a user-defined taxonomy in your design, you can loop the taxonomy name to the_terms() command, such as: the_terms( $post->ID,'people','People:',',',',','); this shows the lists of persons associated with each contribution.
Please be aware that the_terms() displays the text on the monitor where the call is made. In order to get a dynamical listing of items as an arrays for use in the contents, use get_terms().
'; Please notice that'hide_empty' must be wrong for the feature to revert to returning all words, otherwise only the words associated with the posting will be reverted. When you create a taxonomy, it usually generates a specific Query tag with the category WP_Query that we can use to get contributions from it.
To create a mailing lists for example where "Bob" is included as a "Person" taxonomy, we use: $query = new WP_Query('person' =>'bob' ) ); or, for more sophisticated arguments: Taxonomy' => Person', Field' => Slug', Terms' => Bob'); $query = new WP_Query( $args); If your site uses customized permission links, you must update your permission link tree after changes to your taxes, otherwise you may see an " page not found" bug.