2022 Developer Survey is open! Take survey.

Hot answers tagged

1 vote
Accepted

Post and page content not displaying in search results

The problem in your code is that your function is only returning the content when is_page() is true, which is not on the default search results page, where is_search() is true. Likewise, the content ...
user avatar
  • 31.5k
1 vote
Accepted

How to remove the message 'We could not find any results for your search' without changing template files and without adding posts/pages?

The answer was to change the input name variable of the form. It was 's' for my widget.
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible