A Better Way to Exclude Pages from Search Results December 18, 2014 by Joshua Nelson This little snippet allows you to selectively remove a post type (like pages) from the search results, without inadvertently excluding other post types.