Fix Breaking of Search
WP search will not return any results when this plugin is active.
Our developer documented a fix here:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Distinct Functionality | |
*/ | |
public static function distinct_post( $distinct ) { | |
if ( ( isset( $_REQUEST['s'] ) || isset( $_REQUEST['orderby'] ) ) && ( isset( $_REQUEST['post_type'] ) && sanitize_title( wp_unslash( $_REQUEST['post_type'] ) ) ) == self::$post_type ) { | |
return 'DISTINCT'; | |
} | |
return $distinct; | |
} |
Current Status
Completed
Last updated: December 18, 2022
0 comments
Log in to comment on this feature request.