Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › How to weight post parents over children › Reply To: How to weight post parents over children
Hi,
For exclusions, under the Advanced Options -> Exclude results you have options to exlude by taxonomy terms/users/date or by ID or manually.
However, there is a query argument that can be accessed via code, where you can specify a post parents – so only posts that are children of these parents are displayed.
For example, if you need only the top level items, then setting the post parent to 0 will do the trick. You can also specify more than one post parent ID as well. This knowledge-base article has a sample code: Limiting results to specific posts by parent ID
To include only top level posts, then set the $ids array to:
[php]$ids = array(0);[/php]