How to Exclude Specific Pages and Posts from WordPress Search

The ease of use and powerful built-in features make WordPress the most popular CMS on the web. You can do many things without paying anything, from customizing your site design to managing content comprehensively.

However, the current WordPress version leaves plenty of room for improvement in the WordPress search. When you or visitors search for a query in your blog, WordPress will provide a list of all related posts, pages, and custom post types in time order. This creates a narrow search result page and doesn’t always deliver the best outcome.

Although the revolution of WordPress in 2013 introduced changes in presenting search results, by relevance rather than by date, users might not feel satisfied. When visitors search for something on your blog, they tend to look for an article instead of a landing page. Then, they have to scroll down to find the desired one in the long list and pick the most relevant content.

That’s why in this article, we plan to help you create a better user experience and improve your website’s usability with sorted WordPress search results. Before digging into details, let’s explore WordPress’s built-in search feature and 3 main reasons for excluding items from WordPress search.

WordPress Default Search Feature

WordPress comes equipped with a search bar enabling you to enter a search term and find relevant pages, posts, and custom post types. The top results will include the search query in titles or at least inside the content. After that, these most relevant results will be further classified chronologically by published dates.

Here is an example of how your WordPress search page looks. The first post contains the keyword right in the title so it appears at the top of the page.

 ppwp-wp-search-example

Why exclude pages from WordPress search?

Site owners explain their content exclusion actions in various ways. Some don’t want checkout pages, my account pages, or thank-you pages to appear in search results. Others own a membership website providing valuable content to members only, so they don’t want standard visitors to find these pages and posts via WordPress search.

#1 Running an online store

As mentioned, pages confirming orders such as the checkout or thank-you pages mustn’t show up easily in WordPress search results since they include your customers’ confidential details as well as their orders.

Once getting these types of information, they can steal the products effortlessly. Hence, you’ll lose revenue and probably consumers’ trust.

#2 Providing protected content or a membership site

Not all content in your WordPress site brings the same value to readers. Some posts with general information can be available everywhere on the internet. However, pages containing a lot of research should be accessible to certain people or members only.

Unauthorized people are not allowed to find private pages and posts via the WordPress search bar. In case they can find these posts, although the content is protected, they’re able to guess what the post is about via the title and description.

To take one example, a password-protected WooCommerce product page still shows up on the shop page or archive pages. Visitors will see a password form only when trying to view it.

Excluding protected content from search results enables you to completely hide your private posts from unwanted users. They’ll have no chance to see the page title or its main content in search pages.

#3 Hiding content from a specific author

Last but not least, you sometimes don’t want posts from particular authors to display on WordPress search results due to several reasons. It might be because they have some copyright issues or these writers no longer contribute to your blog’s development.

Excluding their content from WordPress search means that more relevant pages and posts are presented, and at the same time it makes your search less crowded. Other regular writers have more chances to show up their works to visitors.

How to exclude pages from search using Protect WordPress Pages & Posts plugin

Primarily coming as a content protection plugin, Protect WordPress Pages and Posts also assists you in taking pages and posts off WordPress search.

The plugin basically secures your private content by redirecting the original URL to a 404 page. You can replace this URL with custom private access links and send them to users. Only those with these links are able to read your pages.

Once your content is protected, you can decide where to hide those pages or posts from. There are 2 options in the plugin settings page permitting you to shield your secure content. To get started with the plugin, you need to:

  1. Download Protect WordPress Pages and Posts plugin
  2. Go to PluginsAdd NewUpload Plugin
    add-new-plugin
  3. Install and activate the plugin
  4. Head to the plugin General settings page and enable 2 options “Hide protected posts from the following places” and “Prevent Printing Protected Content
    pda-hide-protected-content
  5. Select Search results from the dropdown list and save your changes
  6. Visit Pages or Posts and click “Configure protection
    pda-configure-protection
  7. Generate your private links

That’s it! Nobody can find your secure content on any WordPress search results now, even though they’ve entered a highly relevant or exact query. Out of the box, it’s possible for you to shield protected pages and posts from other places such as the Frontpage, Category pages, or the Recent posts list.

What’s more, you have complete control over WordPress search results of your pages and posts. They’re handled in 2 separate dropdowns, “Hide protected posts from the following places” and “Hide protected pages from the following places”. For example, protected posts must not show up on WordPress search results and archive pages while pages can be hidden from the front page only.

 pda-control-protected-pages-posts-search

How to remove pages from WordPress search using PPWP plugin

Another method of cutting out pages and posts of WordPress search is using Password Protect WordPress Pro (PPWP) plugin.

The plugin generally locks your WordPress pages, posts, custom post types, categories, or the entire site with one or multiple passwords. Unwelcome users have to fill in the password form to open the page.

PPWP Pro has improved the user experience by allowing you to manage protected content visibility. In other words, you’re enabled to exclude secure pages and posts from various places, including WordPress search results.

Follow these 6 simple steps to password protect your WordPress content and shield them from search pages:

  1. Download, install, and activate the PPWP Pro plugin
  2. Open the list of your WordPress pages or posts
  3. Click “Password protect” for your desired content and generate passwords for it
    pda-password-protect-page
  4. Go back to the plugin settings page and scroll down to the Protected Content Visibility section
    pda-password-protected-content-visibility
  5. Choose the type of content you intend to take off WordPress search: Pages & Posts or Products
  6. Find “Search results” in the dropdown then save your changes

Users find no way to look for your password protected content via any WordPress search pages now.

Which is your solution to exclude pages from WordPress search?

Hiding specific pages and posts from WordPress search results benefits you in many ways. You can improve the experience of users when surfing around the on-site content by making the result page less crowded and providing more relevant results.

You have 2 simple tools to hide WordPress content from search pages, either Protect WordPress Pages and Posts plugin or Password Protect WordPress Pro plugin. Both of them help protect your private pages and posts from unauthorized access and exclude the protected content from search. However, each works on a totally different path.

The former basically secures your content by disabling the original URLs and replacing them with private protected links while the latter covers pages and posts with a password form.

Install Protect WordPress Pages and Posts and Password Protect WordPress Pro plugins and have your protected content excluded from WordPress search now!