Skip to main content
grouped this as programmatical suggestion.
Source Link
user20301
  • 514
  • 2
  • 7

If you are still using the search from core, you should switch to for example search_api. 

That beeing sayed, if you wish to avoid installing another contrib module and are willing to implement the functionality as a part of custom module. You could set excluded node types (programmatically) and then use hook_query_alter to filter out those types from each search.

If you are still using the search from core, you should switch to for example search_api. That beeing sayed, You could set excluded node types (programmatically) and then use hook_query_alter to filter out those types from each search.

If you are still using the search from core, you should switch to for example search_api. 

That beeing sayed, if you wish to avoid installing another contrib module and are willing to implement the functionality as a part of custom module. You could set excluded node types (programmatically) and then use hook_query_alter to filter out those types from each search.

Source Link
user20301
  • 514
  • 2
  • 7

If you are still using the search from core, you should switch to for example search_api. That beeing sayed, You could set excluded node types (programmatically) and then use hook_query_alter to filter out those types from each search.