Try to change this part:
echo $before . 'Search results for "' . get_search_query() . '"' . $after;
To this:
$searchTerm = get_search_query()
echo $before . 'Search results for "' . $searchTerm . '"' . $after;
Related Posts:
- Page/Post path in Search Results
- Search is always exact [closed]
- Empty search returns home page, how to return not found search page?
- How to make search include data from wp_postmeta?
- How to look at code in WordPress repositories without downloading?
- Display search results within the same page
- Insert DIV container below 1st search result
- How to make WordPress search prioritise page titles?
- How to add the author search in the default wordpress search?
- How do I redirect /search/ to wordpress search template?
- How to search for users based on added user metadata
- Search by Post ID and display content of the post in search result
- Let user change posts per page
- Turning Broken URLs Into Search Terms?
- Change the Search Base in a multi language wordpress
- Search uses index.php instead of search.php on renaming search field from “s”
- Changing the default WordPress search action
- Set default text for the_search_query();
- Noindex, nofollow stuck on homepage
- What are the different options for excluding certain post types from search results?
- Is_search not working on search results page
- Search in post title and custom fields
- How to change users smart quotes to dumb quotes in search bar?
- Trim the search result around the search word
- Searching custom fields is removing search on the post_title column
- Edit search results in order to advertise
- Search function works improperly
- Is there a wordpress plugin enabling an autocomplete search box, then jump to page?
- WordPress, fetching users with an exact match in a string of comma separated values in user_meta
- search form redirects to home
- How can I hide uncategorized products from search results?
- Exclude html from search results (image names, etc.)?
- documentation for wordpress 3.7 keyword
- WordPress Search not picking up text provided by a Plugin
- What does wordpress search, search?
- How to combine two get_users() array?
- why pre_get_posts works fine in post type archive, but not in search result list?
- How to get started?
- Search not working. Appending a “
- Search posts by Tag
- Change Twentyeleven Search Form Text
- redirected to the login screen when I do a blank search
- Add Google custom search to wordpress.com [closed]
- Changing default wp search string
- How do I exclude a specific page (and child pages) from the search results?
- Sort WP Search results by date
- How to pass data to wordpress page (without GET parameter)
- Cannot pass ‘S’ parameter more than two letters
- Check If search query contains something?
- Show search count by post type
- How to have multiple instances of the same taxonomy in a search form
- Alter BuddyPress member search to include search on added profile fields [closed]
- Enhancin 404 to contain a search from URL
- Searching for one letter returns extra empty post
- How to create a search form with multiple search fields
- REST API: Search products only in the names
- Bots using internal wordpress search
- WordPress search – Display the paragraph which has the searched word/term
- Altering search results to handle a post meta field not working in current WordPress
- WordPress Search by tags
- How to Integrate Live search in WordPress?
- WordPress search post using unicode
- Search results are showing full page instead of sample
- Create search box on Archive Custom post type
- How to pass variable to get_search_form()?
- Why the search results are wrong in search posts form?
- Search isn’t displaying all results
- How to use regular page template for search results?
- Search only blog posts on blog page
- Search: display all found matches inside post
- Auto search field without buttons, shows first result from search page
- Can I set up a search box that uses fields?
- How to Search Users on the Base of Latitude and Longitude in Users meta_key and meta_value
- Search.php Modification Needed
- Search taxonomy terms, not posts
- Returning the entire line of a custom search result filter
- search does not yield access restricted results
- Customizing Home Page with Pagelines Platform
- Search Limited to Categories Not Working
- Google Search and Own Website Search?
- How we filter the search base on post-meta tags
- How to display articles based on composed tag
- Make search result returned only from tags! [duplicate]
- Form Data Causes “Page Not Found”
- Search query with quotes
- WordPress search form and input type=”image”
- Search options/filters
- Search Results with googlemaps
- How to search pdf attachment?
- Website Search Results Not Showing Images
- How to search for articles containing two words?
- Wp eCommerce meta information search [closed]
- How do I create a search form that searches only within a custom post type?
- Two Querys in one Search – Category-Tag nightmare – HOW?
- How to make wordpress Dynamic Search-icon from Predesigned Static Html Search-icon?
- Code in the excerpt of the search page
- WordPress REST API response – not returning results from custom taxonomy, only from title
- Members location sortable based on UK Postcode
- 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?
- search posts by POST ID