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.

Is there a code snippet I can add to my functions.php, etc., that will include comments in the search (without plugin)?

share|improve this question

1 Answer 1

Whether you put custom code in your theme's functions.php or in a plugin, you're still using custom code. So I'm going to ignore your "without a plugin" requirement and instead suggest these two plugins:

There is absolutely no reason to use custom functionality in functions.php rather than a plugin. When you're asking for such advanced/complex functionality as a global search, that requirement becomes a huge limitation and will prevent you from ever finding the answer you're looking for.

If you're still hung up on not using a plugin, you might want to offload the actual search to another engine like Google. In that case, this video tutorial on integrating a custom Google search might be useful.

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.