diff --git a/includes/class-admin.php b/includes/class-admin.php index 519fdc9c..ce727109 100644 --- a/includes/class-admin.php +++ b/includes/class-admin.php @@ -3189,13 +3189,22 @@ public function ajax_friends_dashboard() { if ( isset( $post_formats[ $format ] ) ) { $args['post_format'] = $format; - $query_args['tax_query'] = array( // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_tax_query - array( - 'taxonomy' => 'post_format', - 'field' => 'slug', - 'terms' => array( 'post-format-' . $format ), - ), - ); + if ( 'standard' !== $format ) { + $query_args['tax_query'] = array( // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_tax_query + array( + 'taxonomy' => 'post_format', + 'field' => 'slug', + 'terms' => array( 'post-format-' . $format ), + ), + ); + } else { + $query_args['tax_query'] = array( // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_tax_query + array( + 'taxonomy' => 'post_format', + 'operator' => 'NOT EXISTS', + ), + ); + } } }