Stop searches in WordPress from including pages

Stop searches in WordPress from including pages

Estimated reading time: 2 minutes

One of the most common features of a WordPress website is the search function. So naturally, you want your visitors to find all the great posts you have created. However, adding a search function can be problematic – especially if you only want to include your blog posts in the results. 

Why only include posts in search results?

Your website’s primary pages are where you promote your products and services. You will undoubtedly have a header (containing a menu) and a footer linking to all the pages. There is no need to include pages in search results most of the time. 

Searching your blog posts is the most useful function. You might have hundreds of posts on your website, and you need a way for visitors to find them. And you want your service pages to be excluded from that search.

How do you exclude pages from searches?

If you search Google, you will find many code snippets that exclude pages from search results. And that is fine for the more technical website owner. However, it becomes more of a problem when technology skills are not your primary strength! 

The great news is that there is a more straightforward option. At SaneChoice, we created a plugin that anyone can easily upload and activate via the WordPress admin. Its very simple, and it removes the headache of manually adding the code to your WordPress functions.php file.

Using the Plugin

Our Plugin is easy to use and install. Just follow the below instructions.

  1. Download the Search Only Posts plugin. 
  2. From your WordPress dashboard, choose Plugins > Add New.
  3. Click Upload Plugin at the top of the page.
  4. Click Choose File, locate the downloaded file and click Install Now
  5. After the installation is complete, click Activate Plugin.

Once the above is complete, your searches will only return posts and never return pages. And if you have any questions, then please feel free to contact us.

SaneChoice started in 2004 when a customer was frustrated by their hosting provider at the time. Since that year, SaneChoice has been providing technology services to clients worldwide, with a strong focus on helping small businesses understand technology.

  • Services
  • Company
  • SEO AnalyserFREE