Connect Users and Taxonomies

I came across a tutorial about ‘Custom User Taxonomies in WordPress‘ and there is a plugin based on that ‘User Taxonomies‘ but these are for creating taxonomies for Users. Have a read thought the tutorial it might help. I think what you’re talking about is to associating posts’ taxonomies with users. I think you need … Read more

Restrict taxonomy dropdown to post type

You can use a snippet I found for querying terms that are attached to a particular post type: function wpse_207655_terms_by_post_type_or_meta( $clauses, $taxonomy, $args ) { $meta_query = new WP_Meta_Query; $meta_query->parse_query_vars( $args ); $post_types=””; if ( ! empty( $args[‘post_type’] ) ) { if ( $_post_types = array_intersect( ( array ) $args[‘post_type’], get_post_types() ) ) $post_types = … Read more

wp_insert_term auto unique name

EDIT PART DEUX OR PART DEUX – The Dirty Sequal, The Term Saga Continues… Before anyone read this section, I will urge you to read everything I explained in ORIGINAL ANSWER. wp_insert_term() does not allow duplicate term names in non hierarchical taxonomies or in hierarchical taxonomies within the same hierarchy. From comments to my answer, … Read more

Custom taxonomy on users with UI

Answering this question is, by design, a multi-part process. There are several things you (or a plugin/library) need to do to make User Taxonomies behave similarly to Post Taxonomies, even after you have (successfully) registered it. This answer is a work-in-progress to some degree. Please add other answers with solutions to any aspects that are … Read more

Not Able to Insert Taxonomy Term Using wp_insert_post()

Few points come to mind: There is a typo in “post_type” => “‘eyeglasses” (extra single quote). It should be: “post_type” => “eyeglasses”. Try putting the $term instead of array( $term ): “tax_input” => array( “models” => $term ) Also, is it models or model? e.g. “tax_input” => array( “model” => $term ) tax_input requires assign_terms … Read more

term_description help

H1 tags around the descriptions? echo ‘<h1>’ . term_description() . ‘</h1>’; UPDATE: Add link to plugin to allow HTML in term descriptions. WordPress Plugins – Allow HTML in Category Descriptions This will work with custom taxonomies to. http://wordpress.org/extend/plugins/allow-html-in-category-descriptions/ Copy of the appropriate code For those of you that want to simply see how it’s done. … Read more