Can you add the visual editor to the description field for custom taxonomies?

Just wrote the function. It’ll display the tinymce editor in every custom taxonomy description right now. Surely you can edit to show it for only some specific taxonomy. /** * Display advanced TinyMCE editor in taxonomy page */ function wpse_7156_enqueue_category() { global $pagenow, $current_screen; if( $pagenow == ‘edit-tags.php’ ) { require_once(ABSPATH . ‘wp-admin/includes/post.php’); require_once(ABSPATH . … Read more

WordPress tax_query “and” operator not functioning as desired

not tested but give this a shot ‘tax_query’ => array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘image_tag’, ‘field’ => ‘term_id’, ‘terms’ => 25, ‘operator’ => ‘IN’, ), array( ‘taxonomy’ => ‘image_tag’, ‘field’ => ‘term_id’, ‘terms’ => 41, ‘operator’ => ‘IN’, ) ), OR ‘tax_query’ => array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘image_tag’, ‘field’ => … Read more

How do I append multiple taxonomies to the URL?

This is certainly possible by utilizing some rewrite rules of your own to some extent. The WP_Rewrite API exposes functions that allow you to add rewrite rules (or ‘maps’) to convert a request to a query. There are prerequisites to writing good rewrite rules, and the most important one is basic regular expression comprehension. The … Read more

How to Add Custom Taxonomy To Woocommerce Plugin

You have to do: add_action( ‘init’, ‘custom_taxonomy_Item’ ); Because: Use the init action to call this function. Calling it outside of an action can lead to troubles. see codex page register_taxonomy. Besides that : Better be safe than sorry when registering custom taxonomies for custom post types. Use register_taxonomy_for_object_type() right after the function to interconnect … Read more

How to add images to taxonomies?

Starting from WordPress 4.4, you can use add_term_meta function to store metadata for a term. This is basically a key-value pair information which is stored in wp_termmeta table. Original Answer(Prior to WP 4.4) WordPress doesn’t have the option to add extra information to taxonomies. There isn’t any taxonomy_meta table. So, you have two options. Create … Read more

Count posts in custom taxonomy

Use an instance of WP_Query to query the database. http://codex.wordpress.org/Class_Reference/WP_Query To query database for custom taxonomies use, $query = new WP_Query( array( ‘people’ => ‘bob’ ) ); For more details on available options see: Taxonomy Parameters http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters Retrieve published posts using ‘post_status’ => ‘publish’ Use found_posts to retrive the number of posts $count = $query->found_posts;