search-filter
search-filter copied to clipboard
empty_search_url doesn't work when post_types is specified
As the post_types parameter always adds the value to the URL the empty_search_url is never called.
Changing line 1072 to this fixed the issue for me.
if($this->urlparams=="/?s=" || $this->urlparams=="/?s=&post_types=" . $post_types)
Not sure though if this will work when you have multiple post types specified.
Ran into this same issue. In my case, the taxonomies I'm filtering on are only enabled on the custom post type I'm searching so I can get by without using the post_types parameter but otherwise I would need to make the above change to get things to work.