Limit search form to 4 custom post types only

You have to change the input with 4 inputs like this : <input type=”hidden” name=”post_type[]” value=”videos” /> <input type=”hidden” name=”post_type[]” value=”e-courses” /> <input type=”hidden” name=”post_type[]” value=”e-books” /> <input type=”hidden” name=”post_type[]” value=”white-papers” /> You may get more detail about a complete code in this article

custom naming of search permalink /search/

The reason it isn’t working is because you haven’t told WordPress how to handle that page. You can do so by applying a rewrite rule in the following manner. add_action( ‘init’, ‘wpse_63716_search_rule’ ); function wpse_63716_search_rule(){ add_rewrite_rule(‘^suche/([^/]*)?’, ‘index.php?s=$matches[1]’, ‘top’); } Don’t forget to flush the permalinks after adding the above code.

WordPress search exact match

You might want to append the query parameter sentence=1 in your search, it is not well documented, but it should retrieve content inside the post that matches exactly the sentence pattern. Alternatively, for a more powerful search, you might want to give a look at Relevanssi plugin. A lot of people agree that WordPress search … Read more