public function getSearchQuery($where, $query)
    {
        if (is_admin() || $query->is_main_query()) {
            return $where;
        }

        global $wpdb;

        if (isset($_GET['search']) && !empty($_GET['search'])) {
            $search = sanitize_text_field(esc_attr($_GET['search']));
            $where .= " AND ($wpdb->posts.post_title LIKE '%$search%' ) OR ($wpdb->posts.post_content LIKE '%$search%' ) ";
        }
        return $where;
    }