modify wordpress default search

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?

Read More

I need to search from specific post ids, so I want to modify search in this particular way.

Related posts

Leave a Reply

1 comment

  1. The output of search results is controlled by search.php template (or generic index.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.