• 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;
    }

    https://www.ads-software.com/plugins/admin-meta-search/

Viewing 1 replies (of 1 total)
  • Brilliant — I was just having this problem and adding the above code to admin-meta-search.php did the trick!

Viewing 1 replies (of 1 total)
  • The topic ‘Just a little tweak’ is closed to new replies.