Forum Replies Created

Viewing 1 replies (of 1 total)
  • Posting to an older thread but could be of use to someone. I had the same issue; it turned out to be caused by the theme which had this code in functions.php, which is intended to run on the frontend but is breaking search/filter on the backend. You see this limits results to only “posts”; since images are not posts.. no results whatsoever!

    function gt_search_filter($query) {
    if ($query->is_search) {
    $query->set('post_type', 'post');
    }
    return $query;
    }

    I wrapped the offending line in another if statement to resolve

    if (!is_admin()){ ... }

Viewing 1 replies (of 1 total)