I'm developing my own Wordpress theme and I was wondering if it is possible to modify the search query in a way that it only return results that are child pages of the actual page.
The reason I want this is that our site is getting really big and the user should be able to navigate to a parent page and then search for pages in this topic.
I give you an example. Our site is about the chemistry studies and has a page tree of the following form:
- Home
- Tipps & Ticks
- Practical courses
- Organic Chemistry
- Synthesis
- ...
- ...
- Synthesis
- Inorganic Chemistry
- Proof for anions
- Sulfide
- ...
- ...
- Proof for anions
- Physical Chemistry
- Organic Chemistry
So if the visitor has navigated to the "practical courses" page, the search form should only search for the input on it's child pages. Same for the subpages of that page. This would simplify the process of finding the right article enormously as the user can add "filters" by navigating to a specific page.
I'm happy for all answers and ideas. Regards, Chwebo