Same issue with you and just found it out on stackexchange.
Put codes below in the function.php in your theme.
function _cancel_query( $query ) {
if ( !is_admin() && !is_feed() && is_search() ) {
$query = false;
}
return $query;
}
add_action( 'posts_request', '_cancel_query' );
Here’s the source
Related Posts:
- Remove Page Timestamp via functions.php so it doesn’t show in Google Search Result Description [closed]
- I had removed my phone number from my website footer, but months later it still appears once I look it up on google, how to remove it?
- how to limit search to post titles?
- How does WordPress search work behind the scenes?
- Remove some pages from search
- Extend WordPress search to include user search
- WordPress blog with 30 000 posts: poor search performance
- How do I filter the search results order?
- Link to search page without search parameter
- Search/Replace for editor in HTML-mode
- How to pass a search $_GET parameter to a new custom search page?
- Do I need to sanitize WordPress search query?
- Neither the_excerpt() nor the_content() works properly?
- Add custom parameters to JSON API search query?
- How to stop _wpnonce and _wp_http_referer from appearing in URL
- Return all Tags from search results
- Search results with custom loop don’t update when paged
- how to hide specific post from google search
- Does WP search natively return results sorted by type (post, post type, page, category…)?
- How do I properly redirect outbound links with special characters
- Display Categories in Search Results
- intellisense in wp search
- Sitelinks Search Box in Google and urlencoded search string
- SQL query to get adjacent posts from search query
- Is it possible to search authors by profile field?
- Search result conditonal tag
- WordPress search issue with searching html tags
- Get search term not on searh results page?
- Search in Two Categories
- Use search in fancybox
- Search Result from another wordpress website
- Remove WHERE conditions from search query
- Change default search URL slug in wordpress with Custop Post Type as Search target
- Transliterating search term in another language
- How to exclude events (custom posts) from search, if the start date has already passed?
- How to conditionally pass a parameter to wordpress search to limit post types?
- Change WordPress search Permalink structure
- How to load WP categories into array for autocomplete?
- Custom SQL query on wp_users with the addition of wp_usermeta
- Media searching ignored
- Filter post_type thumbnail in Search result
- Generate list of tags from search results
- Use created page as search results page and custom template
- How do I search dynamically created content?
- How to set empty search to load homepage template and not index.php
- Post 2 Post Site Search
- Using search.php without a ‘s’ field in searchform.php
- Search queries don’t seem to work?
- How to implement search suggestions into search bar?
- Array_search ignoring the first element [closed]
- Add Icon to Placeholder Text in Search Form
- Unexpected esc_html and esc_attr behaviour
- WordPress search page doesn’t work with either $_GET or $_POST
- Search Results No Link
- Modifying post content with the_post action hook
- Trying to remove plural ‘s’ from search Query but it’s just removing every letter of the end – what am I doing wrong? Thanks
- Search for two strings in WP search
- Sort search results by Custom Field
- Blog search just returns to front page (not search results!)
- Order search results by category
- Strip HTML Tags From Search Results
- How to build an advanced search form by post type?
- Should I create a parent page with no content? [closed]
- WordPress Search Form Issue | Misleading search URL. | Pointing to wrong URL
- Why WP_Query’s ‘s’=>’keyword’ searches only for ‘post_title’ and why not ‘post_content’?
- adding more text to a query string
- Independent search tool that returns exact match of a post title
- Included posts on a page searchable
- Site Title in my Search URL
- I want empty search returns to home page in my wordpress
- How to remove notice inside search.php when no results are found?
- Prevent searches less than 4 characters
- Search wordpress using three different drop down menus
- search: get minimum number of post for each post type
- WordPress Search function with partial and exact match
- How to get search result as image rather than page
- Search results – 404 error after hitting enter
- Redirect wordpress search query if its a tag
- Is it possible to show subdomain posts in main domain search result?
- How to search in Elastic by post title/concerpt/content?
- Replacing word in wordpress Search not working Properly
- How to add search box to table results in admin page [closed]
- how to disable autocomplete search on wpLink?
- How might I go about using the API to search for a user by email, but ensuring that it is an exact match?
- Add CPT to search results with pre_get_posts
- making a search form and search page in wordpress theme
- Replacing wordpress search with custom code
- Change output URL Search module
- search for single meta_key with numeric array of meta values
- How to customize default wordpress search query
- Customizing Google’s Search box in WordPress [closed]
- I’ve messed up the admin search functionality. Help!
- meta field search too restrictive in pre_get_post() for custom search
- Content instead Excerpt on term
- Custom search results page not showing excerpt
- Error when searching without any results
- Listing parent section in search results
- Search results: How to add direct jump to anchor?
- Limit search to posts and pages
- How make Autocomplete with wp_query in post_type attachment