1

I'm adjusting a drupal installation for a customer and added some custom content types. Now I want to exclude them from the search results.

So I looked into the manual on https://drupal.org/project/custom_search

Within Configuration > Search and metadata > Custom search [Tab: Content] I checked the types I want to exclude below Content exclusion

I saved the configuration and cleared all caches (just to be sure). But still all the content types show up in the results page /search/test (for example)

2 Answers 2

1

I ran into the same issue, and then found:

"Don't forget that each block has its own settings for content exclusion (via Block configuration / Content)."

(from: https://drupal.org/node/1516914#comment-7306658)

1
  • thanks, but in what way does this have to do with the content exclusion? Seems to me that this only effects blocks being displayed and that it has nothing to do with exclusion of content within search results. By the way: I can't find any section in the menu with the name 'Block configuration'.
    – Jørgen
    Jul 2, 2013 at 8:21
0

The custom search settings located at *admin>config>search>custom_search* will only impact the main Drupal search block (which does not have it's own block settings). In order to change the content exclusion setting for a custom search block you will need to visit: admin>structure>block and then click the configure link next to your custom search block.

Once on the configure page scroll down to the "content" section, and check the boxes next to the content types you need to exclude.

After you save your block you should find that those content types no longer show up on the search results page.

Note: If you have multiple custom search blocks then you will need to configure the exclusion settings for each one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.