Search results page is not displayed

The search function does not work as expected.

The results are only displayed on the search results page for the fewest search terms. However, for most search terms you are immediately redirected to one of the archive pages. This is strange because in the preview view in the archive layout for the search results it works perfectly. As soon as I’m in the frontend it stops working.

What could that be about?

Example: For the keyword “tisch” there are a number of posts that have the keyword in the title. Instead of listing them all on the results page, I’m taken to an archive page.

Hello @mrdplusd,

Thanks for writing to us.

I checked your site it seems that the search is working fine on my end. I would suggest you please purge all the cache from the cache plugin and recheck it.

Hope it helps
Thanks

Hello Prakash,

First of all, thanks for testing.

What you saw is not the search results page, but the archive page of one of the CPTs. It says Search Results in the breadcrumbs, but that’s not true. The real layout for search results looks different. See image.

Thank you!

This is the search results page:

Hi @mrdplusd,

The priority is the reason behind your problem. I have added -1 to the Search Archive layout and now it is showing as expected.

Thanks

1 Like

Unbelievable, I had already played around with it and used different values, but no negative ones. Thank you very much, I learned something new again.

Hi @mrdplusd,

Please remember that the lesser value has higher priority.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.