Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › How to pass/get the ID of the page where the search is placed? › Reply To: How to pass/get the ID of the page where the search is placed?
December 5, 2016 at 12:08 pm
#11119
Keymaster
Hi!
If I’m guessing correctly you only want to return the pages from the same category as the currently displayed page is in.
In that case something like this could do the trick:
This will get the current post/page categories and push them to the query arguments.
In case you have posts/pages which are uncategorized, you might want to turn OFF an option to exclude them as well: http://i.imgur.com/Rnuslom.png