Hello Oslaf
Because plugin search settings are global and overwrite WordPress default behavior, in this case you can disable plugin behavior by filters for any one search form.
use this hidden field for anyone form where you do not require meta search or taxonomy search
<input type="hidden" name="disable_wpes" value="1" />
and put this in function.php
function wpes_enabled($wpes_enabled) {
return FALSE;
}
if (isset($_GET['disable_wpes']) && $_GET['disable_wpes']) {
add_filter('wpes_enabled', 'wpes_enabled');
}
get details about more filters here
Thread Starter
Oslaf
(@oslaf)
Hi again; thanks for your quick reply.
That does the trick, but it obviously disables the extended search completely for that form, and I did want to still extend the search to default taxonomies (categories and tags) and some meta fields in the blog post searches.
Plus, it creates a visible URL parameter which can be manually tweaked by the user…
I thought a solution would be possible and simpler to achieve, since the Search Everything plugin does keep the manual search parameters. I’d rather use your plugin, though, since yours is actually way more versatile (and SE is cartoonishly cluttered with pointless options and ads)
Hello,
Thank you for your nice comment. I believe that i missed that feature, it will take few days to update the plugin. I’ll update this feature in trunk and will let you know once it is available to download.
Hi,
Plugin is updated to support post_type parameter you can download the development version here https://downloads.wp.xz.cn/plugin/wp-extended-search.zip
Thread Starter
Oslaf
(@oslaf)
Cool, thanks again. I’ve been using a simple pre_get_posts action to fix the issue (had to give it a ridiculous priority to make sure it actually overrided WPES, though). I’ll get rid of it with the next version of WPES then.
if ( $_GET["post_type"] == 'post' && $query->is_main_query() ) {
$query->query_vars['post_type'] = 'post';
}