Do you want to learn how to exclude pages from the WordPress search results?
By default, the internal search on your WordPress site will include all posts and pages in the search results. To make it easier for visitors to find what they’re looking for, you may want to exclude certain content, so it never appears in those results.
In this article, we’ll show you how to exclude certain pages from the WordPress search results, step by step.
Why Exclude Pages from WordPress Search Results?
The default WordPress site search includes all of your posts, pages, and custom post types in the search results. This works well enough for many WordPress website owners.
With that said, let’s show you how to exclude pages from your WordPress search results.
Note: This guide is about on-site search results, where a visitor uses your website’s search box to look through your content. If you want to exclude pages from Google search results, then you should see our guide on how to hide a WordPress page from Google.
Create a New WordPress Search Algorithm with a WordPress Plugin
It’s very easy to use and gives you complete control of your WordPress search results.
First thing you need to do is install and activate the plugin. For more details, see our step by step guide on how to install a WordPress plugin.
Upon activation, navigate to Settings » SearchWP and then click the ‘License’ menu option.
Then, you can enter your license key into the ‘License’ box and click the ‘Activate’ button. You can find the license key by logging into your SearchWP account.
After that, you need to click on the ‘Engines’ menu option.
This takes you to a page where you can set your default search engine settings. Think of it like creating your own Google search algorithm that’s only for your WordPress blog.
With SearchWP, you need to create a sitewide search engine before you can start excluding pages from the WordPress search results.
You can change the search engine settings by scrolling to the ‘Posts’, ‘Pages’, or ‘Media’ section. Each section has an Application Attribute Relevance that will change how the search engine ranks your website’s content.
For example, if you move the ‘Title’ slider to the left and the ‘Content’ slider to the right, then the content will carry more weight than the title.
You can also completely stop all pages from appearing in the WordPress search results.
To exclude all pages from the search results, simply click ‘Remove’ in the ‘Pages’ section.
This opens a popup where you can uncheck the ‘Pages’ box.
Then, simply click on the ‘Done’ button to exclude all pages from the search results.
Once you’ve finished customizing the default search engine settings, you just need to save your changes.
To do this, just click on the ‘Save Engines’ button.
At this point you may see a message asking you to rebuild the index. If this happens, then simply click on the ‘Rebuild Index’ button.
Exclude Specific Pages From the WordPress Search Results
Sometimes you may only want to exclude specific pages from the search results, such as your WooCommerce checkout page.
To do this, we’ll be using the Exclude UI extension from SearchWP. When you’re logged into your SearchWP account, go to the Exclude UI download page and click ‘Download Extension’.
Then, install and activate the extension just like you would any other WordPress plugin. For more details, see our step by step guide on how to install a WordPress plugin.
After that, open up the page that you want to exclude from the search results and make sure the ‘Page’ option is selected in your right hand menu.
You can now simply check the ‘Exclude from search’ checkbox.
Then click the ‘Update’ button, and that page will no longer appear in the search results, even if users search for that exact page title.
If you want to hide more pages from the search results, then simply follow the process described above.
To exclude specific blog posts from WordPress search results, you can follow the same steps above. The only difference is that the right-hand menu will say ‘Post’ instead of ‘Page’.
We hope this article helped you learn how to exclude pages from the WordPress search results. You may also want to see our beginner’s guide on how to get a free SSL certificate for your website and our best business phone services for small businesses.