Create an archive page for custom taxonomies

It looks like your issue is the name of your taxonomy has a capital letter, the first argument of register_taxonomy is to be all lowercase, no spaces as the documentation for the register_taxonomy function mentions here. Change your code to the following and your taxonomy-gallery.php template will work correctly. register_taxonomy( ‘gallery’, array( ‘photo’ ), array( … Read more

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