Exclude WordPress pages from Search results

Here's a cool snippet to remove the WordPress Pages from search results.

Pretty straight forward, paste the following code inside your functions.php file:

You can also filter the WordPress Search by custom post type, if you need to 😉

2 comments

Leave a Reply

Add <code> Some Code </code> by using this tags.

*
*