Anyone know of an easy way to alter the default WordPress search from searching ALL pages, to searching only child pages from a specific page parent?
I know of the filter you can use to alter whether pages or posts are searched:
function SearchFilter($query) {
if ($query->is_search) {
$query->set('post_type', 'page');
}
return $query;
}
add_filter('pre_get_posts','SearchFilter');
Maybe there is a way to add further information here to specify a particular page parent?