How to Search only Posts or Pages in WordPress
The WordPress search function by default will display all published pages and posts in the search results. In this tutorial we will teach you how to search only posts or pages in WordPress by utilizing PHP functions.