How to include all public post types in WordPress search

This snippet will automatically include all public post types (that have not been excluded from searches), in your search results.

Instructions
Add this to your functions.php file

Comments

Leave a Reply

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

Snippet Info

Tested with Wordpress v. 4.8
Last Modified: 06.03.2018
Last Reviewed: 06.03.2018

How to include all public post types in WordPress search
4.6 (92.5%) 8 votes
Please report broken snippets.
Report Broken Snippet