This plugin works just fine,
But, I need to fix the duplicate search results. It shows over 15 pages of duplicate posts results.
Please help me fix this issue.
Thanks ??
]]>In order to avoid duplicate rows, i just use the “distinct” at query:
add_filter(‘posts_distinct’, ‘search_distinct’);
function search_distinct() {
global $pagenow, $wpdb;
// Filter only when performing a search on edit page on all page / post / custom post type
if ( is_admin() && $pagenow==’edit.php’ && $_GET[‘s’] != ”) {
$distinct = “DISTINCT”;
}
return $distinct;
}