My wordpress website does not show 404 page and results in http 500 error when I search a particular query and the results are not available. For any page if the results are not available, it shows http 500 error.
If I change the theme, everything comes back to normal.
My wordpress website does not show 404 page and results in http 500 error when I search a particular query and the results are not available. For any page if the results are not available, it shows http 500 error.
If I change the theme, everything comes back to normal.
Share Improve this question edited Mar 1, 2022 at 12:10 Rup 4,3904 gold badges28 silver badges29 bronze badges asked Feb 26, 2022 at 11:27 user219717user219717 1 1- 1 ToongePrime is correct, the error is going to be in your theme. However if you're getting 500 errors then there will be details of the error in one of your error logs: try the web server's error log, or your PHP error log if separate, or WordPress's own wp-content/debug.log if you've enabled that. – Rup Commented Mar 1, 2022 at 12:11
1 Answer
Reset to default 2Since changing your theme makes everything come back to normal, then, basically, it means the problem is from the theme you wish to use.
It looks like the theme is missing templates that should show up upon returning 'no results' for your query, or, there are errors in the template(s) supposed to display.
This scenario should show a 'no results' template and not really a 404 page.