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 ...
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.
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
search × 1764wp-query × 216
custom-post-types × 214
php × 121
custom-field × 109
query × 107
customization × 102
custom-taxonomy × 93
plugins × 80
filters × 78
posts × 68
categories × 62
functions × 57
woocommerce-offtopic × 57
tags × 57
pagination × 55
pre-get-posts × 51
ajax × 49
templates × 49
loop × 48
forms × 48
meta-query × 46
pages × 44
theme-development × 40
taxonomy × 39