Custom order of posts in wp_query and different taxonomies
Custom order of posts in wp_query and different taxonomies
Custom order of posts in wp_query and different taxonomies
This is not really a WordPress issue, you will have to play around with the CSS to get the layout you desire, if you take a look at isotope.js library you will see that hey have documentation on how to display Masonry grid https://isotope.metafizzy.co/layout-modes/masonry.html , and if that doesn’t fit your needs you can learn … Read more
WP_Query Regexp whitespace and end of string
How to check if logged in user have pending custom post?
I found the solution after a long search. Thank you very much to Misha Rudrastyh who gave me a great idea in my solution. You can check out the great guide that he prepared for meta_query. Here is the solution: First, get the first and last day of the month as described here (thanks for … Read more
The problem was that there were ‘pinned’ posts, which were overriding everything. Un-pinning these posts seemed to do the trick. Also, thanks to Sally CJ for the nopaging tip – I wasn’t aware that it causes posts_per_page to be ignored also.
How do I stop the same post showing multiple times in a archive?
the_post() operates on the main query, but this isn’t the main query you’re looping over, you need to use $q->the_post() Remember: the_post() is the same as global $wp_query; $wp_query->the_post(); All post loops are WP_Query post loops if you dig down deep enough, even get_posts has a WP_Query inside it There can only be 1 current … Read more
try changing ‘orderby’ => ‘meta_value_num’ to ‘orderby’ => ‘meta_value meta_value_num’
Not sure if it helps you any, but I think splitting this into two simple queries is a simple way to do it but then requires some extra work to be able to display two $query results sequentially. This may also be better for users as you could make it clear that you’re showing them … Read more