list all post who have mutual taxonomy as current taxonomy!

No custom programming answer: A plugin like https://facetwp.com/ will allow you to set up filters as you have described. Custom programming answer: You can create a shortcode that renders fields for the user to check and submit. Then, attach a javascript submit handler to the form so that when the user checks a box or … Read more

Get queried object for custom post type count

function wpse340250_term_count( WP_Term $term, $post_type) { $q_args = [ ‘post_type’ => $post_type, ‘nopaging’ => true, // no limit, pagination ‘fields’ => ‘ids’, // only return post id’s instead of full WP_Post objects will speed up ‘tax_query’ => array( array( ‘taxonomy’ => $term->taxonomy, ‘field’ => ‘term_id’, ‘terms’ => $term->term_id, ), ), ]; $term_count = get_posts($q_args); return … Read more

Search for single post by 2 tags

Using the tax_query param in your args (and replacing the dot with a comma) should get you what you’re looking for: $args = array( ‘tax_query’ => array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘post_tag’, ‘field’ => ‘slug’, ‘terms’ => ‘fetch’, ), array( ‘taxonomy’ => ‘post_tag’, ‘field’ => ‘slug’, ‘terms’ => ‘agirt’, ) ) );

WP_Query not using custom taxonomy categories on custom post type

WP_Query only returns WP_Post objects for the results. To get the taxonomy terms for each post you need to use get_the_terms( $post, ‘recipe_categories’ ); for each post. This is because WP_Post represents each row of wp_posts, which does not include taxonomy information. The links between posts and terms is in the wp_term_relationships table.

Display Custom Field or Custom Taxonomy in front page /post/product

It depends on the theme you’re using if it has the functionality to show the information. Usually, if you had a custom attribute using default WP, it will show those but for advance custom fields you might need to add the code into your theme. For example, the following code will help you to display … Read more

Custom Taxonomies Archive Page 404

I solved it with this workaround. I created a new page (“Movies” with the URL domain.cc/movies) and added this via shortcode: <?php $taxonomy = ‘artists’; $tax_terms = get_terms( $taxonomy, array( ‘post_type’ => ‘artwork’, ‘orderby’ => ‘name’, ‘order’ => ‘ASC’ ) ); ?> <?php foreach ($tax_terms as $tax_term) { ?><div class=”artistslist”> <a href=”https://wordpress.stackexchange.com/<?php echo $taxonomy;?>/<?php echo … Read more