Free Classified Site - Bedpage

How to Exclude a Custom Post Type From Search

Prem Tiwari - - WordPress

H friends, hope doing good. Today I am going to share a very useful tutorial how to exclude a custom post type from search. If you want to exclude a custom post type from your website search option, then this tutorial is designed for you.


How to Exclude a Custom Post Type From Search

Below is an example which will exclude a custom post type from search results. Open functions.php file from your current activated WordPress theme and copy paste below code at the end of the file.

Over to You

If you still need any help to with your WordPress website, then feel free to put your comments in below comment section. I will be happy to help you. If you like this tutorial, do you like & share this article with your friends, and don’t forget to follow us on Facebook and Twitter to learn cool WordPress tutorials.

About: Prem Tiwari

Prem Tiwari is the founder of and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.

Tags: , , , , ,

Recommended Tutorials

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.