I would like to modify WordPress default search.
I have 2 questions: which template file to modify, and how can I include posts ids that I want to include in search?
I need to search from specific post ids, so I want to modify search in this particular way.
The output of search results is controlled by
search.php
template (or genericindex.php
if it’s not present).And search is technically a usual WordPress loop with
s
query argument, so any snippets that apply to loops can be used to tweak search.