Hi
I think the 2 searches have a different query.
1) Search page (eg http://www.ypaithros.gr/?s=agrotes)
2) td-drop-down-search – Newspaper theme (header search with suggestion)
The second search (with suggestion) works well
The default WordPress search (www.xxx.gr/?s=test) returns wrong results
Why Newspaper-theme search query is different from wordpress default search page?
Hi,
The results should be the same, the search functionality is based on WordPress capabilities
– https://www.screencast.com/t/n8gooG8uC
– https://developer.wordpress.org/reference/functions/get_search_query/
If you are not satisfied with this functionality, there are multiple search plugins that have many more customization options. You could try some of them and check the results.
Thanks
Search page query (eg http://www.ypaithros.gr/?s=agrotes)
AND ypn_posts.post_type IN (‘post’, ‘page’, ‘attachment’, ‘tribe_venue’, ‘tribe_events’, ‘tribe-ea-record’)
AND (ypn_posts.post_status = ‘publish’ OR ypn_posts.post_status = ‘tribe-ea-success’ OR ypn_posts.post_status = ‘tribe-ea-failed’ OR ypn_posts.post_status = ‘tribe-ea-schedule’ OR ypn_posts.post_status = ‘tribe-ea-pending’ OR ypn_posts.post_status = ‘tribe-ea-draft’ OR ypn_posts.post_status = ‘private’)
2) td-drop-down-search – Newspaper theme (header search with suggestion)
AND (ypn_posts.post_password = ”)
AND ypn_posts.post_type IN (‘post’, ‘page’, ‘attachment’, ‘vc4_templates’, ‘tribe_venue’, ‘tribe_events’, ‘tribe-ea-record’)
AND ((ypn_posts.post_status = ‘publish’))
Why search queries is different?
Hi,
The search is conditioned to posts with published status
– https://www.screencast.com/t/Bq2UOwdOx
That could be the reason why this is happening.
Thanks
