0

How to Exclude Pages from WordPress Search Results

 2 years ago
source link: https://dev.to/softcodeon/how-to-exclude-pages-from-wordpress-search-results-22bj
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

How to Exclude Pages from WordPress Search Results

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 your site 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,

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.

However, if you’re running an online store, then you may want to hide pages like your account page, checkout page, thank you page, and more. The same goes for those running membership websites or online courses. You may want to hide subscriber-only content from appearing in search.

With that said, let’s show you how to exclude pages from your sitewide WordPress search results.

Note: This guide covers on-site search results, when a visitor to your website uses a search box to search through your website content. If you’re looking to exclude pages from Google search results, then you should see our guide on how to hide a WordPress page from Google.

To read complete detail Exclude Pages from WordPress Search Results


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK