- November 29, 2017 at 5:31 pm #15674
I have a general question, but can supply login details if needed. I would like to know if I can set up a custom search on this page to search only sub-pages within this directory : http://mather.wpengine.com/care-treatment/
The goal for the search on this page would be to only search pages within the “Care & Treatment” section, excluding other pages of the site (as well as any posts). Would these pages need to be changed to posts or custom post types in order to do this? Or would I be able to add a tag to all pages which I want to be included within results (ie “care & treatment”?) – would this work with the index ?
ColinNovember 29, 2017 at 9:11 pm #15676
It depends on how the current page structure is defined. If the 'Care & treatment' page is actually the parent page of the pages you need to search, there might be a really easy solution: Knowledge Base – Limiting results to specific posts by parent ID
Another possibility is to enable categories to pages (or any other taxonomy) and then only include the category you want the results from.Best,
To have categories with pages, there are multiple plugins available, for example: Post tags & Categories for pages
If you like my products, don't forget to rate them on codecanyon :)
November 30, 2017 at 9:04 pm #15682
Awesome, thanks !
You must be logged in to reply to this topic.