the_post_thumbnail and multiple WP_Query
Missed last two loops had $queryX->the_post(); after the_post_thumbnail(); Now when I changed it – works perfectly! Hope it helps someone!
Missed last two loops had $queryX->the_post(); after the_post_thumbnail(); Now when I changed it – works perfectly! Hope it helps someone!
Wp Query sort order
I am by no means an AJAX expert, I have only ever used for pretty much what you are needing it for. It can be quite a lengthy explanation for a forum post. But when I was trying to achieve the same thing the first time, I found this excellent YouTube video series (5 parts) … Read more
Include search tags and users in my search results system
How to return count of items found in SQL query
Look at taxonomy parameters in WP_Query, the “Multiple Taxonomy Handling” example does pretty much what you want if I understand you correctly.
I think your query is wrong post__not_in only accepts array of post_id’s only. I think it should be like this. $onemonth_before = date(‘Y-m-d’, strtotime(‘-1 month’)); $args = array( ‘tag__not_in’ => array(<pass tag_id here>), ‘date_query’ => array( ‘before’ = $onemonth_before, ‘inclusive’ = true, ), ); $query = new WP_Query($args);
Adding a nav menu for a custom post type
Maybe try adding this before the loop: $count = $wp_query->post_count; But that may only return the number of posts you have set for posts_per_page, in that case you might be able to use: $count = $wp_query->found_posts;
Ok, I’ve just tested this in my installation (with a taxonomy that exists here). Usually, I just quickly throw stuff into the functions.php and look at the SQL that’s generated (print $event_query->request;). That didn’t work and the tax_query always generated 0 = 1 thus making sure that there were no results. Finally, heureka, the taxonomy … Read more