A frequent error made by many WordPress site owners is allowing all pages to show up in search results. Instead of discovering valuable blog posts or product pages, visitors often land on irrelevant pages such as ‘Terms of Service,’ ‘Privacy Policy,’ or ‘Thank You for Your Purchase.’
This can negatively impact the overall user experience, as these pages are not particularly useful in search results. For eCommerce websites, pages like the checkout or user account sections typically do not need to be included in search results either.
After thorough testing, we’ve identified a plugin that simplifies the process of determining what appears in your site’s search results – SearchWP.
In this guide, we’ll walk you through the steps to exclude pages from WordPress search results. By removing irrelevant pages, you’ll enhance the user experience and help visitors find the content that truly matters to them. 🕵️♀️
Why Should You Exclude Pages from WordPress Search Results?
Excluding certain pages from WordPress search results is essential for making your site’s search function more effective and improving the experience for your visitors.
By default, WordPress includes all posts and pages in search results, but not every page is beneficial to users. Common examples of pages you might want to exclude include:
- Pages for Online Stores:Account pages, checkout pages, thank you pages, or any other pages that visitors should not discover through search.
- Pages for Membership Websites:Pages exclusive to subscribers or protected content that should not be visible in public search results.
- Other Internal Pages:Terms of Service, Privacy Policy, or administrative pages that do not provide value to visitors.
Excluding these pages ensures that search results remain relevant and prevents visitors from accessing pages they cannot view.
In this guide, we will demonstrate how to exclude pages from WordPress search results. You can use the quick links below to navigate through this tutorial:
- Step 1: Install a WordPress Search Plugin
- Step 2: Create a Custom Search Algorithm
- Step 3: Exclude Specific Pages from WordPress Search Results (Optional)
- Step 4: Create and Embed Your Search Form
- Bonus Tip: Exclude Posts, Taxonomies, and More from WordPress Search Results
- Frequently Asked Questions: Excluding Pages from WordPress Search Results
- Additional Guides for Enhancing WordPress Search
💡 Note: This guide focuses on on-site search, where visitors utilize your website’s search box to explore your content.
If you’re looking to prevent certain pages from appearing in Google search results, check out our comprehensive guide on hiding WordPress pages from search engines.
Let’s begin.
Step 1: Install a WordPress Search Plugin
The simplest method to exclude pages from WordPress search results is by using the SearchWP plugin, which is the top-rated search plugin for WordPress and is utilized by over 30,000 websites.
SearchWP allows you to search through content that WordPress typically overlooks, such as comments, custom post types, PDF files, WooCommerce products, and categories. Additionally, it enables you to exclude specific content from your search results.
To explore all of its features, check out our in-depth SearchWP review.
First, you need to install and activate the plugin. For detailed instructions, refer to our step-by-step guide on installing a WordPress plugin.
After activation, navigate toSearchWP » Settingsand click on the ‘General’ tab.
Here, enter your license in the ‘License Key’ field. You can find this information in your account on the SearchWP website. Once completed, be sure to click the ‘Verify Key’ button.
Step 2: Develop a Custom Search Algorithm
Once you activate the plugin, you can customize how SearchWP indexes, searches, and presents your content. Think of it as creating a personalized search algorithm tailored specifically for your WordPress blog or website.
Before you can exclude pages from the search results, you need to set up a sitewide search engine. Navigate to SearchWP »Algorithm.
In this section, you’ll find various content types that SearchWP searches by default, including pages, posts, and media files.
Each content type features its own Application Attribute Relevance sliders, allowing you to adjust how SearchWP ranks the content on your online marketplace, blog, or website.
For instance, if you slide the ‘Title’ slider to the left and the ‘Content’ slider to the right, the content will be prioritized over the title.
You have the option to exclude all pages from the search results or to exclude only specific pages.
To prevent all pages from showing up in your WordPress website’s search results, click the small trash icon next to ‘Pages.’
This will open a popup where you can uncheck the ‘Pages’ box.
After that, simply click ‘Done’ to remove all pages from the search bar and results.
Once you’ve completed customizing the default search engine settings, it’s important to save your changes. Even if you intend to exclude certain pages or posts, you must first save your updated sitewide search algorithm.
To save your changes, scroll to the top of the screen and click the ‘Save’ button.
SearchWP will automatically rebuild the index. This process may take a few minutes, depending on your Internet connection speed.
When you see ‘Index Status 100%,’ it means that SearchWP has successfully indexed all your content and settings.
Your site will now automatically utilize the enhanced WordPress search functionality.
Step 3: Exclude Specific Pages from WordPress Search Results (Optional)
Would you like to exclude certain pages from search results, such as the WooCommerce checkout page?
After establishing a sitewide search algorithm as described above, you can exclude individual pages from the search results.
To do this, you will use the Exclude UI extension, which adds an ‘Exclude from search’ option to the page editor.
In the WordPress dashboard, navigate toSearchWP»Extensions.Here, locate the Exclude UI extension and click the ‘Install’ button.
Next, navigate to the page you wish to exclude from search results. Ensure that the ‘Page’ tab is selected in the right-hand menu.
Now, check the box labeled ‘Exclude from search’.
After that, click the ‘Update’ button to ensure this page is removed from search results. To hide additional pages, simply repeat the process outlined above.
Step 4: Create and Embed Your Search Form
With your custom WordPress search engine set to exclude certain pages, the next step is to create a search form using that engine.
Just head over toSearchWP»Search Formsand click the ‘Add New’ button. This will allow you to create a new search form that you can personalize.
For detailed instructions, refer to our guide on creating a custom WordPress search form. This guide provides a step-by-step walkthrough for creating and embedding the search form on your pages, posts, and widget areas.
You can also incorporate the search form into your search bar. If you’re using a classic theme, you’ll need the SearchWP Modal Search Form plugin.
If you’re using a block theme, you can utilize the Full Site Editor to add your SearchWP form to the navigation menu.
For more in-depth information, check out our guide on adding a search bar to your WordPress menu.
Bonus Tip: Learn how to exclude posts, taxonomies, and more from your WordPress search results.
You may want to refine your WordPress search results to display only specific types of content.
This is particularly useful for excluding items such as private posts, unwanted custom post types, or specific taxonomies like tags.
For example, if you use tags for internal organization but want to keep them hidden from users, excluding them from search results can be beneficial.
In this situation, refer to our guide on how to exclude specific pages, authors, and more from WordPress search results.
Another option is to exclude certain page categories from appearing in the search results.
To achieve this, you will need a well-defined system for categorizing your pages, which may require some planning. Fortunately, no additional plugins are necessary.
To display pages from specific categories only, refer to our guide on searching by category in WordPress.
Frequently Asked Questions: Excluding Pages from WordPress Search Results
Do you still have questions about hiding certain pages from WordPress search? Below are some frequently asked questions to assist you.
Will excluding pages from search results impact my SEO?
No, removing pages from yoursite’s internalsearch will not influence your WordPress SEO. It only alters what users can discover through your site’s search feature.
However, if you prevent pages from being indexed by Google using methods like noindex or nofollow, thatcanimpact how search engines rank or display them.
How can I exclude specific types of content from search results?
The simplest way to hide content such as posts, pages, or custom post types is by using a plugin. Usually, you can access the plugin’s settings and deselect the content types you wish to exclude from your search results.
Is it possible to exclude specific pages without a plugin?
Yes, but it is more complex. You would need to insert custom code into your theme’sfunctions.phpfile, which is not advisable if you are not familiar with coding. Using a plugin is much simpler and safer.
For more information, check out our comparison article on WordPress Plugin vs Functions.php File.
Are there additional advantages to customizing WordPress search results?
Certainly! Streamlining your search results enhances the user experience, allowing visitors to easily find what they’re looking for. This leads to increased engagement on your site and potentially higher conversion rates as users discover your top content more quickly.
Additional Resources for Enhancing WordPress Search Functionality
We hope this guide has helped you understand how to exclude pages from WordPress search results. You may also find our other guides useful:
- How to Implement Multilingual Search in WordPress
- How to Integrate Voice Search Features into Your WordPress Site
- How to Enable Live AJAX Search on Your WordPress Site
- How to Use Fuzzy Search in WordPress for Better Results
- How to Access Search Analytics in WordPress
- How to Resolve Issues with WordPress Search Functionality
- How to Enhance WordPress Search Using SearchWP
If you enjoyed this article, please subscribe to our YouTube Channel for WordPress tutorials. You can also connect with us on Twitter and Facebook.



