• 1. does the search query search the text in the title or only in the content of a post? Can I get it to search the titles?

    2. how do i reset the search query to include a search in a meta variable of a post?

    3. I tried all the hints to include custom post types in the search. i have about 6-7 custom types. does the key word ‘any’ work? – as in:

    function filter_search($query) {
        if ($query->is_search) {
    	$query->set('post_type', 'any');
        };
        return $query;
    };
    add_filter('pre_get_posts', 'filter_search');

    or do i need to list all the types in an array in that second variable?

    thanks in advance for all help!

  • The topic ‘Search Query questions’ is closed to new replies.