rmorse / search-filter

Search & Filter is a simple search and filtering plugin for WordPress
GNU General Public License v2.0
93 stars 41 forks source link

WordPress query variable is `post_type` not `post_types` #30

Open CAYdenberg opened 7 years ago

CAYdenberg commented 7 years ago

This line in SearchAndFilter::check_posts is not correct:

$this->urlparams .= "post_types=".$post_types;

as WordPress will ignore the post_types variable. Under certain conditions this leads to the wrong template file being selected or even the wrong search results.

I can submit a PR if you like: I suspect tho you may not be happy with the disconnect between your own variable names names and the default names you're later injecting into the URL.