I am trying to sort posts by custom taxonomy. I have a custom post type which is course-cpt and I have created custom taxonomies within it, I need to...
I’m running a WP_Query with a tax_query with two tax_query statements with an OR relationship. $tax_query_terms = array( array('taxonomy' => 'post_tag', 'terms' => array(695), 'field' => 'id'), 'relation' =>...
TL;DR: How can I sort a WP_Query based on how many ‘matches’ there are on the tax_query set. Furthermore, how can I then add more posts if the posts_per_page...
I am attempting to build a tax_query, and I’m unable to make it behave. What I want to retrieve from the query are two different content types: A) Posts...
I’m trying to display the related products with my custom html output, unfortunately i’m kind of lost on how to do this. The WP_Query below displays the products that...
We sell a combination of multiple products as one product, these products can’t be added separte to WordPress so we use a normal product type for the combination. These...
I wanted to change the default taxonomy terms order by its ‘term_order’ value instead of ‘name’ in admin side. So I tried something like below. But it doesn’t work...
For sure it’s very simple, but I can not figure out how to do this. I need to query all posts that has a specific taxonomy set. Like this:...
I have been trying to output content of all post-types (Posts, Pages and CPTs) based on a term of a custom taxonomy that they must share (meaning if they...
I want fetch all posts from the post type book in the custom taxonomy book_tags with the meta key lang and the meta value en. My code: <?php $args...