How to include Custom Post Type in WordPress Search Result?

In the WordPress default search, custom post types are not included in search results. So in order to include custom post types in the search result, we have two methods: one using custom code in your theme functions.php file and second using third party free WordPress plugin.

Custom Method

You can include custom post types in the search result by adding below function in your functions.php file.

Using WP Extended Search WordPress Plugin

To include Custom Post Types in WordPress Search, you can also use third party free WordPress Plugin WP Extended Search. WP Extended Search provided the feature to include/exclude Tags, Categories, Custom Post Types, Taxonomies, and Custom Meta Keys in default WordPress Search.

You can read in brief about the usage and features of WP Extended Plugin in my post: How to Improve WordPress Search with WP Extended Search.

Share

Disclaimer: *This post may contain affiliate links. I may earn a small commission when you click on the links and buy the products with no additional cost to you. Thank you.

Subscribe
Notify of
guest

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

2 Comments
Oldest
Newest
Inline Feedbacks
View all comments