tax_query showing no results
@Milo found that the problem was with the code to order by the track number taxonomy. I’m going to make track number a custom field.
@Milo found that the problem was with the code to order by the track number taxonomy. I’m going to make track number a custom field.
Your best option is to use a taxonomy. If EN, DE and FR are terms then you then loop through them and get the pages on a per term basis. You can do this in conjunction with a plugin that enables you to manually re-order terms such as this one. https://wordpress.org/plugins/i-order-terms/ You can then do … Read more
Some thoughts on how I would approach this. I can update later with some code if necessary when I have the time. I would handle the first page with two additional queries, so three loops on page one. Hook pre_get_posts and do two meta queries for the three posts that will appear in the first … Read more
query and paginate multiple post types
which gives me all posts inside the tax inspiration – I need to alter this, so that I get only selected ID’s in my array, ex. 4714, 3608, instead of all terms of the tax. I’m assuming you mean that this query gives you all posts inside post type inspiration and you want to pull … Read more
Order posts by custom field
Your query won’t work as it will simply ignore your taxonomy query. This is not a bug but expected behavior. When using p as your parameter, every other query parameter are ignored/bypassed like for example post_type, tax_query and any taxonomy related queries like category and tag parameters due to the fact that you are directly … Read more
category__and works, but why?
As noted by @s_ha_dum, I had some sticky posts. I had to use the ‘ignore_sticky_posts’ => true argument inside the WP_Query.
posts_per_page not returning correct number of posts