Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
1  
There is a whole page of information at the WP Codex on Creating a Search Page –  Brady May 17 '11 at 17:01

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.