Answers.Body: <p>This should work for a single section:</p>
  
  <pre><code>{% set entries = craft.entries.section('not news').search(query).order('score') %}
  </code></pre>
  
  <p>to exclude more sections:</p>
  
  <pre><code>{% set entries = craft.entries.section([
      'and', 'not news', 'not blog'
  ]).search(query).order('score') %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-06T15:09:36.943Z
Answers.LastActivityDate: 2015-11-06T15:09:36.943Z
Answers.UserDisplayName: carlcs
Body: <p>I'm trying to figure out how to exclude a Channel, Structure or Singles from my search results.</p>
  
  <p>Currently I have the default example from Craft</p>
  
  <pre><code>{% set query = craft.request.getParam('q') %}
  {% set entries = craft.entries.search(query).order('score') %}
  </code></pre>
  
Tags: <templating><search>
Title: How do I exclude a Channel, Structure or Singles from search?
ThreadText: # How do I exclude a Channel, Structure or Singles from search?
  
  (Asked by: username_0 on 2015-11-06)
  
  I'm trying to figure out how to exclude a Channel, Structure or Singles from my search results.
  
  Currently I have the default example from Craft
  
  ```
  {% set query = craft.request.getParam('q') %}
  {% set entries = craft.entries.search(query).order('score') %}
  
  ```
  
  **Tags:** templating, search
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-11-06. Score: 10 | Accepted answer
  
  This should work for a single section:
  
  ```
  {% set entries = craft.entries.section('not news').search(query).order('score') %}
  
  ```
  
  to exclude more sections:
  
  ```
  {% set entries = craft.entries.section([
      'and', 'not news', 'not blog'
  ]).search(query).order('score') %}
  
  ```
  
  
  ---
  
  