Step 2:

Next we want to display the search form that will allow users to search based on custom post type. Add the following code wherever it makes sense in your theme template file(s). For example, search.php or sidebar.php. Here is the custom codes to use: