diff --git a/functions.php b/functions.php index 33edbf1..a60b7b3 100644 --- a/functions.php +++ b/functions.php @@ -216,7 +216,7 @@ function db_filter_authors_search( $posts_search ) { if ( empty( $matching_users ) ) return $posts_search; // Take a slightly different approach than core where we want all of the posts from these authors - $posts_search = str_replace( ')))', ")) OR ( {$wpdb->posts}.post_author IN (" . implode( ',', array_map( 'absint', $matching_users ) ) . ")))", $posts_search ); + $posts_search = str_replace( ')))', ")) OR ( {$wpdb->posts}.post_author IN (" . implode( ',', array_map( 'absint', $matching_users ) ) . ") AND {$wpdb->posts}.post_type = 'post'))", $posts_search ); return $posts_search; } /**