Forums › Forums › Search & Filter Pro › Exclude from search
- This topic has 12 replies, 3 voices, and was last updated 4 years, 10 months ago by
Anonymous.
-
Anonymous(Private) June 16, 2020 at 6:22 pm #249032
This topic isn’t really specific to this plugin, but maybe some WordPress search pros can assist…
I have a custom post type (created with Pods) that I want to be searchable through this plugin but NOT through the global WordPress search feature.
In Pods, I have “exclude from search” checked, but they’re still showing up in the WordPress global search. In Relevanssi, “index” is checked for the post type but “exclude from search” displays “yes.” If “index” is not checked, the post type isn’t searchable through this plugin nor the global WordPress search.
Is what I’m looking to do possible?
Trevor(Private) June 17, 2020 at 11:58 am #249089The problem is that our plugin’s search box asks WordPress (or Relevanssi) to do that part of the search first, and lets them decide what to return back to us. I am not sure how you could achieve what you want, but I will refer this the plugin developer, Ross, for his input.
Ross Moderator(Private) June 17, 2020 at 5:07 pm #249185Quick question, do you need Relevanssi enabled for both global search, and S&F search?
Thanks
Ross Moderator(Private) June 17, 2020 at 5:26 pm #249207Hi again
So I’ve just been having a look, but I can’t seem to find it.
Basically, I think Relevanssi used to have an action / filter, that meant you can disable it on the default WP search. I would look for that (or maybe its moved to a setting in the admin area).
As to why the post type is not showing, I’m not sure, it could just be the way your theme implements the query for searches – I would try to change hte post type using
pre_get_posts
or something similar – I also found this:
https://toolset.com/forums/topic/search-not-finding-a-custom-post-type/Thanks
Ross Moderator(Private) June 17, 2020 at 5:27 pm #249211Ah, this might be the Relevanssi code:
https://wordpress.org/support/topic/disable-relevanssi-for-some-searches/Anonymous(Private) June 17, 2020 at 6:18 pm #249238As to why the post type is not showing, I’m not sure, it could just be the way your theme implements the query for searches – I would try to change hte post type using pre_get_posts or something similar – I also found this:
https://toolset.com/forums/topic/search-not-finding-a-custom-post-type/The results are all correct. I just need the custom post type results to display only when using Relevanssi + Search & Filter and not within the global WordPress results.
Ah, this might be the Relevanssi code:
https://wordpress.org/support/topic/disable-relevanssi-for-some-searches/It’s likely I don’t understand that link, but I’m not sure how it fits.
-
AuthorPosts