Custom Taxonomy user based creation

Re, I think i figure out this topic. To create a user based Term in Custom Taxonomy, i’ve created a meta attached to the term (new WP 4.4 feature) ‘author’ which contains the logged in user ID : add_term_meta($term_id,’author’,get_current_user_id()); and then to retrieve the user who has created the term : $author = get_the_author_meta( ‘user_nicename’, … Read more

Problem with type plugin and custom taxonomies

You need to pass the category name as well if you want to show posts from specific category.. You just need to add one more param to the get_posts array. REPLACE THIS <? $products = get_posts( array(‘post_type’ => ‘products’, ‘posts_per_page’ => 400,) ); ?> WIth THIS <? $products = get_posts( array(‘post_type’ => ‘products’, ‘category_name’ => … Read more

Create 2-layered dropdown menus for custom taxonomy and custom post type

With a combination of jQuery / JavaScript and WP AJAX; you could look for an onchange event on the select box, send an ajax request to your admin-ajax.php with the year and then do a custom WP Query to return the html for the secondary drop down and append it to your dom. https://codex.wordpress.org/Plugin_API/Action_Reference/wp_ajax_%28action%29 http://api.jquery.com/jquery.ajax … Read more

Select posts wich has no relationship in custom taxonomy

I have found an answer by myself, for those landing here by google: $taxq = array( array( ‘taxonomy’ => ‘story_lng’, ‘field’ => ‘id’, ‘operator’ => ‘NOT EXISTS’, ) ); That results in AND (NOT EXISTS( SELECT 1 FROM wp_term_relationships INNER JOIN wp_term_taxonomy ON wp_term_taxonomy.term_taxonomy_id = wp_term_relationships.term_taxonomy_id WHERE wp_term_taxonomy.taxonomy = ‘story_lng’ AND wp_term_relationships.object_id = wp_posts.ID)) AND … Read more