When I recently working on a custom website design, I wanted to place a search form in the header. While testing the functionality of it, I noticed something I didn’t like.
Anytime a search was performed, the results were a combination of my posts and my pages and it was something I wanted to fix.
Thankfully WordPress has a filter in place that allows you to remove pages from search results. This isn’t a Genesis-specific function, but still gets the trick done.
Below is the code snippet I used to remove pages from search results:
Source: WP Beginner