WP_Query with MetaQuery issue

You may want to try adding the ‘RELATION’ => parameter into your meta query array so that you can encompass all of your meta values. Something like this: $v_args = array( ‘post_type’ => ‘loads_available’, ‘s’ => “Post Name”, ‘meta_query’ => array( ‘relation’ => ‘AND’, array( ‘key’ => ‘type_of_load’, ‘value’ => “Frozen”, ‘compare’ => ‘=’, ), … Read more

How to Insert data with wp cron

First you can to create a schedule for one minute, then bind function with that hook. function add_new_intervals($schedules) { // add weekly and monthly intervals $schedules[‘every_single_minutes’] = array( ‘interval’ => 60, ‘display’ => __(‘Every Minute’) ); return $schedules; } add_filter( ‘cron_schedules’, ‘add_new_intervals’); // To schedule event for this minute event wp_schedule_event( current_time( ‘timestamp’ ), ‘every_single_minutes’, … Read more

This wp_query will not return any posts and only seems to work with post_status inherit?

This part require(‘./wp-blog-header.php’); is all kinds of bad idea. And if your file is indeed in plugin folder then header isn’t even in that location. Custom loads of WordPress core are brittle and the technique is typically only justifiable for performance reasons. It would be better to structure your endpoint via creating actual rewrite endpoint, … Read more