How to Exclude Pages from WordPress Search Results
This Write-Up explains how to exclude pages from the WordPress search results.
WordPress sites include all posts and pages in the search results by default. You can make your site search more specific so that visitors can easily discover what they want.
Moreover, you may want to exclude certain pages or content so that they do not appear in search results.
This section will cover how you can exclude certain posts and pages from the WordPress search results step-wise.
Why Exclude Pages from WordPress Search Results?
Displaying all your pages on your site is totally fine, and your WordPress site includes them in search results which works well for most websites.
But, you may want to exclude some of the pages from search results for some reason.
Similarly, if you own an online store, you want to make your search page more specified and exclude pages like the account page, thank you page, check out page, and more so that your customers can focus on product pages.
Moreover, The owner of the membership website or online courses may want to exclude some subscriber-only pages and other important content pages from search results.results.results.
Note: This tutorial is for on-site search results.
In simple words, when a visitor on your website uses a search box to search content on your website.
To exclude pages from Google search results, you should see our tutorial on hiding a WordPress page from Google.
The WordPress plugin- Search WP
You can use the SearchWP plugin to exclude pages from the WordPress search results. It is the best search plugin for WordPress, which is easy to use. It allows you to control your WordPress search results completely.
To start, you have to install and activate the SearchWP plugin.
You can see our tutorial on how to install a WordPress plugin for more detail.
After activation, visit Settings » SearchWP.
Then click the ‘License’ menu button, enter your license key into the ‘License’ box, and click the ‘Activate’ option.
You can get your license key in your account on the SearchWP website.
Now, click the ‘Engines’ menu and set your default search engine settings.
After that, create a sitewide search engine using SearchWP.
Next, You can adjust the search engine settings by clicking on the ‘Posts,’ ‘Pages,’ and ‘Media’ dropdowns.
Each section has a weight slider that can adjust how the search engine ranks your website’s content.
For example, if you move down the ‘Title’ slider and the ‘Content’ slider up, then the content will have more value than the title.
Moreover, You can completely remove all pages from appearing in the WordPress search.
Clicking the ‘Remove’ option in the ‘Pages’ section brings up a popup where you have to uncheck the ‘Pages’ box.
Then, click the ‘Done’ tab to remove all pages from the search result.
After you customize the default search engine settings, Click the ‘Save Engines’ tab to save your engine settings.
Exclude Pages From the WordPress Search Results
After the settings, we will use the Exclude UI extension from SearchWP to exclude specific pages from the search results on your website.
Once you log into your SearchWP account, Navigate to the Exclude UI download page and select ‘Download Extension.’
Then, you have to install and activate the extension as you do with the WordPress plugin.
Then, open the page you want to exclude from the search results.
Now, select the ‘Page’ option in your right-hand menu and tick the ‘Exclude from search’ checkbox.
After that, click the ‘Update’ tab.
Now, it will hide that page from the search results. It will not appear even if your visitors enter the exact title of the page into your search bar.
To hide more pages from the search results, you can follow the above steps again.
You can also exclude specific blog posts from your WordPress search results. Follow the steps above but select ‘post’ instead of ‘page’ in your right-hand menu.
You can also check our another post on How to exclude pages from WordPress menus.
We hope this helped you!