How to make url parameter “post_type” work on search.php?

I am able to filter tags archives by adding a parameter like ?post_type=slug to the url and this works fine except for search results. I mean where the url contains a search term like:

site.com/?s=searched&post_type=slug

How can i make the “&post_type=slug” also work in this case?

Read more here:: How to make url parameter “post_type” work on search.php?

Leave a Reply

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