source/php/Module/Posts/PostsFilters.php
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;
    }
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;
    }
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 ; }
Returns  Add where clause to post query when free text search
@return string refined Search query
Returns Add where clause to post query when free text search