Support

Account

Home Forums General Issues meta_query orderby overwritten by publish date Reply To: meta_query orderby overwritten by publish date

  • if schedule_time_start stores a unix time stamp, then there isn’t any reason for the post date to have anything to do with the sort order, so I’m completely confused.

    I would probably add a filter on the query and log them to see what is actually being run

    
    add_filter('query', 'log_query');
    // do your query
    remove_filter('query', 'log_query');
    
    function log_query($query) {
      error_log($query);
      return $query;
    }
    

    This will put the query into the error log. You may need to turn on error logging in WP, but I’m not sure about that.