How to Exclude Posts and Pages from WordPress Search Results

Are you using the default WordPress Search widget on your website or blog?

If you are, and you’re publishing content that you don’t want people to find when they’re searching your site, you can use a plugin to exclude that content from the internal search engine.

This only works on Posts and Pages. Categories and Tags are already excluded from the results.

This is all you have to do.

Download and install a plugin called Search Exclude.

Search Exclude WordPress plugin
Search Exclude WordPress plugin – July 2022

The plugin adds a new option to the editing sidebar which includes a check box you can use when you want to exclude a Post or Page from the internal search results. Just check the check box next to “Exclude from Search Results“. Examples could include your privacy policy, terms of use, private pages and product pages if you’re running an eCommerce store.

Checkbox for excluding content from a WordPress website's internal search results
Additional option added to the WordPress editing sidebar

If you’re running a established site with plenty of content, you’ll be pleased to know you can use this plugin in the Bulk Editor. Just check the box next to the Posts or Pages you want to exclude, then choose Hide from the drop down menu where it says No Change in the image below.

WordPress Bulk Editor options for excluding posts and pages from a WordPress website's internal search results.
Use the Bulk Editor to manage multiple Posts or Pages

When you’re done, hit the Update button. The plugin will now go ahead and exclude the selected pages from the search results.

Does it work for Reusable Blocks?

Yes, it does. Reusable Blocks can show up in the internal search results so I find it a good idea to use this plugin to exclude them. Showing a Reusable Block in the search results looks a bit weird to the end user.

Will using this plugin negatively affect my SEO?

No. All you’re doing is stopping the selected pages from showing up in the internal search results. So long as Google can find your pages when its spiders crawl your site, you’ll be okay.

Finally, keep track of the content you’ve excluded by navigating to Settings > Search Exclude. Here you’ll see the Posts and Pages no longer included in the search results.