Search template is not loaded
-
Dear fellow WP devs,
I have a very strange behavior at one of my client’s websites atm. We had to merge two websites which both had new entries in wp_posts table. Merging could be done using sql scripts. After the merge process finished, we discovered the default WP search functionality is not working properly anymore.
No matter which theme we use (Twenty-Twenty-One, old custom theme in which the search functionality has worked before the merging, new custom theme), the search.php template which is present in all themes is never being loaded. Instead the default blog template (home page) is being loaded. There is one slight difference on the home page. The first displayed blogpost is being changed to a post which matches the search query result. Never came across this behavior.
Another interesting fact is that the search template is indeed being loaded when I am logged in and have the WP customizer opened. But as soon as I close it and I send a search query request, only the homepage is being reloaded and not the search template.
We also have a staging env where we still have the old website (before merging two website). On this page the theme and wp configs are identical as on prod and there the search functionality is working. WTF? I did DB diffs all day long and atm I have no idea what causes this behavior.
Any support / advice is highly appreciated.
Thanks and best
Nina
- The topic ‘Search template is not loaded’ is closed to new replies.