public static function get_post_ids_for_date($sitemap_date, $limit = 500) { global $wpdb; $start_date = $sitemap_date . ' 00:00:00'; $end_date = $sitemap_date . ' 23:59:59'; $post_types_in = self::get_supported_post_types_in(); return $wpdb->get_col($wpdb->prepare("SELECT ID FROM {$wpdb->posts} WHERE post_status = 'publish' AND post_date >= %s AND post_date <= %s AND post_type IN ( {$post_types_in} ) ORDER BY post_date LIMIT %d", $start_date, $end_date, $limit)); }