Query post and sort by custom value calculated with custom field on cpt
Query post and sort by custom value calculated with custom field on cpt
Query post and sort by custom value calculated with custom field on cpt
Custom Query: Multiple CPTs and a taxonomy filter
Elementor posts custom query based on tag [closed]
Optimising WP_Query with ACF Fields
How to detect if the ajax_query_attachments_args was triggered to set the featured image?
I wouldn’t use query_posts(). That particular function is meant for making changes to a specific query … and it’s limited enough that you can’t get the kind of custom functionality you need out of it. Rather, I’d use a custom query. What you’ll want to do is query approved comments sorted by their post/approval date … Read more
In your query posts array add this: ‘meta_key’ => (meta key name in database), ‘meta_value’ => 1 To make it at the top use two queries. One for the top first post and one for the rest of the posts/pages. so your whole query will look like this: <?php query_posts(array(‘showposts’ => 1, ‘post_parent’ => $post->ID, … Read more
meta_key value should be name of custom field. I doubt you have fields named after each month, so it’s likely should be eventdate. meta_compare should have value that specifies a comparison operator, or just be omitted and it will default to = in that case. From this you can’t really query full event date on … Read more
Well, way late, but I found this looking for the answer myself before solving it, so I’ll post for others in my boat, as I’m sure the OP sorted this by now. 😉 Use “meta_key” and “meta_value” in your query after taking a look at “post_meta” in your database to figure out what the simple … Read more
This doesn’t seems to be natively possible, even with upcoming improvements in WP 3.1. […] That’s not what taxonomies are for. Taxonomies are for grouping, not for ordering by. If you want to order by something, it has to be something in the post itself, not a term in a taxo. Otto For this kind … Read more