I'm trying to limit a search to only pages, but it isn't working properly. When I include this hidden field in the search form:
<input type="hidden" name="post_type" value="page" />
The results include posts, pages, and custom post types. If I change the above to search only posts, it works properly, and only posts are displayed. Anyone have any ideas why it won't properly restrict my post to only display pages?
I need to restrict the results for this search form only, so modifying the search query results in the search results template or in functions.php won't work for me.