I was hoping to make changes in the search.php file, where I want to display search results from Post, Products and Custom Taxonomy on the same page in three different section. Can anybody help me to achieve this?
Thanks, S
I believe you cannot achieve it in the same loop. Instead, you should have three loops, each setting WP_Query criteria differently (setting WP_Query arguments to filter for Post, Products and Custom Taxonomy). Howevery, you want to save initial search parameters in variable(s), so you could apply them to those three different loops as other parts of arguments array. More details you can find in lower part of this page: https://wordpress.org/support/article/creating-a-search-page/
search.php
doesn't perform a search, it just displays the results. The search is done long beforesearch.php
is loaded