How to Exclude Posts or Pages from WordPress Website Search

When you search WordPress, by default WordPress search displays all posts and pages published on the site that are relevant to your search. However, when users use the WordPress search function, Qatar WhatsApp Number List more often than not they are looking for a particular post and not a site page.

In this tutorial, I will show two easy ways to exclude posts or pages from WordPress search results. We’ll use the plugin technique, and we’ll also see how to easily add code in your functions.php file that will allow you to automatically exclude WordPress posts or pages when someone searches your website.

Why exclude articles or pages from the search?

There are actually a number of reasons why you might want to exclude posts or pages from a search on a WordPress website.

Here are some of the main reasons:

  • You post a private message or private page content for specific users, and you don’t want everyone to be able to find that content on your website.
  • The site includes paid content which should not be accessible to users who do not have permission to view it.
  • You are trying to prevent irrelevant pages from appearing in your site’s search results. A good example of this is the home page or author page appearing in the results. Pages like these will generally not be relevant to a visitor’s search.

Basically, when you exclude posts and pages in WordPress search, you make it easier and faster for users to find relevant content. It is not difficult to accomplish these changes.

Install and Enable Exclude Search

Let’s take a look at how easily we can exclude posts or pages from a search on a WordPress website.

Exclude posts or pages from WordPress search using a plugin

In order to exclude posts or pages from a WordPress website search using the plugin method, we are going to use the Search Exclude plugin.

Search Exclude is a lightweight and simple to use plugin. It allows you to quickly and easily exclude all posts or pages from a blog search in WordPress.


Leave a comment

Your email address will not be published.