Forums › Forums › Search & Filter Pro › Wrong search results with free search input field
- This topic has 4 replies, 2 voices, and was last updated 10 years, 11 months ago by
Anonymous.
-
Anonymous(Private) November 13, 2015 at 11:22 am #29793
Hi,
When I type a searchphrase in the search input field, it always returns empty because it adds the post_type of the current page to the searhcquery. But not the selected post_type from the settings. For example the page where I put the filter is of post_type “tax_type” but I want the search to return only “product_type”. It is correct with the post_meta selectboxes though
How can I prevent that it adds the post_type from the current page to the searchquery?
Thanks
HarryRoss Moderator(Private) November 13, 2015 at 11:56 am #29795Hi Harry
Do you have a link? It should not be adding the post type to the search – do you see the post type being added to the URL?
Thanks
Ross Moderator(Private) November 13, 2015 at 1:08 pm #29797Hey Harry
If the post type is being added, rest assured its not Search & Filter that adding it.
I think you have a plugin, or some custom code, that detects when a search is performed, and changes the post type.
Something like a greedy
pre_get_postsfilter.This is then also having an effect on the S&F results.
Try disabling your other plugins, and removing any custom code you have in your site to test the theory.
Thanks
-
AuthorPosts