WP_Query从搜索帖子除了页面标题而不是页面标题?

I have a custom post type named 'Company' and a basic search on the top right of the screen. Unfortunately, when submitting a basic search the search results populate companies instead of actual pages such as Resources or Tech Advisory Group. http://labbureau.wpengine.com/

I have modified my custom query to search only for pages and ignore all company posts however, the basic search is still displaying companies instead of the actual TITLES of the pages. What can be done of this?

Below is my custom query:

$keyword = $_GET['s'];
             $wp_query = new WP_Query(
                array(
                    's' => $keyword,
                    'post_type' => 'page',
                    'tax_query' => array(
                            'taxonomy' => 'company',
                            'operator' => 'NOT IN'
                            ),
                    'orderby' => 'title'
                    )
                );

Start of loop:

<?php if ( $wp_query->have_posts() ) while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>

Try add hidden input in the search form with the post type you want to make the search on:

<input type="hidden" name="post_type" value="post_type_name" />

On your theme functions.php use this code

function searchfilter($query) {

    if ($query->is_search && !is_admin() ) {
        $query->set('post_type',array('page'));
    }

return $query;
}

add_filter('pre_get_posts','searchfilter');

Here is a simple solution. Go to your Media Gallery and do a search for a file. If the search title is the same as the image title and no results display you have a conflicting query that is running rampant. More than likely this can be found in the functions.php file and is represented as a filter that looks like the following:

function search_filter( $query ) {
    if ( $query->is_search ) {
        $query->set( 'post_type', array('company') );
    }
    return $query;
}
add_filter('pre_get_posts','search_filter');

The function.php file is the king of the hill and will take over all other custom post types you have on your website. If you have multiple searches they will both search for the company post type regardless of whether or not you create a new WordPress query in a template. You need to comment out add_filter. In this example, you need to create a conditional statement for two different search loops. One of your search templates (HTML) needs to have a hidden input that can be retrieved by one of your conditional points to reference a new template with a new query. Do not try the conditional statement with custom post types because you will have to change this in more than one place if it needs to be changed. Here is an example of what this conditional would look like:

if(isset($_GET['search_simple']) && $_GET['search_simple'] = 'search' && !isset($_GET['hdr-search']))
    {
        get_template_part('loop-search');
    }
    else if(isset($_GET['search_simple']) && $_GET['search_simple'] = 'search' && isset($_GET['hdr-search']))
    {
        get_template_part('loop-search2');
    }
    else
    {
        get_template_part('loop-search-blog');
    }