How To Exclude Categories From A Specific Search Form In WordPress

Excluding categories in WordPress is a fairly simple endeavor, whether it be in the loop or in the search query.

However there are times when you have multiple different search forms in WordPress and you may need to manipulate only one of them.

In this post we will look specifically at how to exclude categories from a specific search form in WordPress.

For example you have two forms. One searches for all post types (post, page, etc.) and the other only searches for posts. We want the one that searches for posts only to exclude a couple of categories.

Video Tutorial

Written Tutorial

If you prefer not to watch the video or need more instructions, then continue reading.