Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
August 30, 2022 12:55 pm GMT

Exclude Pages From WordPress Search Results

Exclude Pages From WordPress Search Results

How to Exclude Pages from WordPress Search Results. By default, the internal search on your WordPress website will cover all posts and pages in the WordPress search results. To address it more relaxed for your site users to find what theyre looking for, you may require to exclude certain Pages or Posts, so it nevermore appears in those results.

In this article, you will learn how to exclude Pages or Posts from the WordPress search results. Lets div.

Here we will see two different methods to do this.

  1. Using PHP Code in a template.
  2. Using a specific Plugin

Why Need to Exclude Pages from WordPress Search Results?

By default WordPress, site search covers all of your content in the search results. This works well full for various WordPress website owners. However, if you are managing an online store, then you may desire to hide pages like your account page, Welcome Page, checkout page, thank you page, etc. Also you may require to hide subscriber-only content from appearing in search.

Note: This guide meets on-site search results when a user uses your website search box to search through your website content.

Read More: Exclude Pages From WordPress Search Results


Original Link: https://dev.to/herryjobn/exclude-pages-from-wordpress-search-results-4mdf

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To