Sort posts based on an acf field called fecha value return longtext ‘20240517’

You should be able to order your posts by adding the following to your main args: ‘meta_key’ => ‘date’, ‘orderby’ => ‘meta_value_num’, ‘order’ => ‘ASC’, Example: $args_post = array ( ‘post_type’ => ‘post’, ‘posts_per_page’ => -1, ‘fields’ => ‘ids’, ‘meta_key’ => ‘date’, ‘orderby’ => ‘meta_value_num’, ‘order’ => ‘ASC’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘tipo-de-contenido’, … Read more

How to compare Event period with Week period using get_posts(), meta_query, relation and compare

To be able to do this your post meta values need to be strings in a valid date format, e.g. 2022/01/31 for January 31st 2022. Note I used ISO standard timestamp format with the biggest value first, then everything descending, and avoided using a regional value such as 31/1/2022 from the UK, or 1/31/2023 from … Read more

Query custom fields with three dates – start and end does not work

There is one issue I see in your code. Within ‘meta_query’ you cannot use ‘meta_key’, but it should be ‘key’. For example: array( ‘key’ => ‘_reservation_date_hour’, ‘value’ => $GMT_checkHour,//the value it is grab using ajax form ‘compare’ => ‘>=’, ‘type’ => ‘DATETIME’, ) So with your previous code all ‘meta_key’ lines were ignored. To identify … Read more

Multiple meta value orderby clauses in a WP_Query

This is likely not the “ideal” approach, but this works for me, and now I can move on to other things. If someone has a better option, I’d love to hear it, thank you. $base_args = [ ‘post_type’ => ‘crowdfunding’, ‘numberposts’ => 30, ‘posts_per_page’ => ’50’, ]; $meta_query = array( array( ‘key’ => ‘campaign_start_date’, ‘compare’ … Read more

deneme bonusu veren sitelerbahis casinomakrobetceltabetpinbahispolobetpolobet girişpinbahis girişmakrobet girişpulibet girişmobilbahis girişkolaybet giriş