Search not working correctly

Posted in: Newspaper
Post count: 84

Hi,
I have a problem with search page.
For example, I search for a word (greek language), but the results are wrong.
You can tested here

Post count: 22421

Hello,

Please also test this on a wo default theme like twentysixteen or similar as the search results are provided by wp and not the theme.

Thank you!

Post count: 84

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?

Post count: 20685

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

Post count: 84

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?

Post count: 20685

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

Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic.