Do you want to learn how to exclude pages from WordPress search results?

By default, internal search on your WordPress website will include all posts and pages in the search results. To make it easier for your website visitors to find what they are looking for, you can exclude certain content so that it never appears in these results.

In this article, we'll show you how to exclude certain pages from WordPress search results step by step. But first, we invite you to discover When and how to install WordPress in a subdirectory

Why exclude pages from WordPress search results?

The default WordPress website search includes all of your custom posts, pages, and post types in the search results. It works quite well for many WordPress website owners.

However, if you operate a Online Store, you can hide pages such as your account page, payment page, thank you page, etc.

The same goes for those who run membership websites or online courses. You may want to hide the view of subscriber content in search.

That said, we'll show you how to exclude pages from WordPress search results across your website.

Please note: : This guide covers website search results, when a visitor to your site uses a search field to search the content of your website.

Create a new WordPress search algorithm with a WordPress plugin

The easiest way to exclude pages from WordPress search results is to use the plugin SearchWP. It's the best WordPress plugin search engine used by over 30 websites.

It is very easy to use and gives you complete control over your WordPress search results.

The 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.

During activation, go to Settings »SearchWP, then click on the "License" menu option.

Then you can enter your license key in the "License" box and click on the " Enable ". You can find this information in your account on the SearchWP website.

After that, you need to click on the “Engines” menu option.

This will take you to a page where you need to set your default search engine settings. Think of it like creating your own Google search algorithm that's uniquely for your website.

With SearchWP, you need to build a website-wide search engine before you can start excluding pages from WordPress search results.

Read also: How to view blog metadata for your WordPress themes

You can change the search engine settings by clicking on the “Posts”, “Pages”, “Media” and other types of personalized posts drop-down lists.

Each section has a weight multiplier that will change the way the search engine ranks your website content.

For example, if you move the “Title” slider down and the “Content” slider up, the content will be more valuable than the title.

Customize the weight of the search engine

You can also completely remove all pages from appearing in WordPress search here.

Just click on the 'Remove ' Section 'Pages'.

This brings up a pop-up window where you need to uncheck the "Pages" box.

Then click on the button Done»To remove all pages from the appearance in the search.

Once you have finished customizing the default search engine settings, you should click on the " Save EnginesTo create your first engine.

Save Default SearchWP Engine

Exclude specific pages from WordPress search results

If you only want to exclude specific pages from search results on your website, this section is for you.

To do this, we'll use SearchWP's Exclude UI extension. When you are logged in to your SearchWP account, go to the  Exclude UI download and click on " Download Extension ».

SearchWP exclude UI extension

Then install and activate the extension as you would any other WordPress Plugin.

After that, open the page you want to exclude from the search results.

Then make sure that the option " Page "Is selected in your menu on the right and simply check the box" Exclude from search».

Then click on the button Update profile And this page will now be hidden from search results. Even if your visitors type the exact page title in your search bar, it won't appear.

If you want to hide other individual pages from search results, just follow the above steps again.

To exclude specific blog posts from WordPress search results, you can follow the same steps above. The only difference is that the menu on the right will say " Publish " instead of " Page ».

Other recommended resources

We also invite you to consult the resources below to take more ownership and control of your website and blog.

Conclusion

We hope this article has helped you learn how to exclude pages from WordPress search results. You might also want to check out our beginner's guide on How to easily hide widget title in WordPress

If you liked this article, do not hesitate to contact share on your different social networks .

...