Answers.Body: <p>This should do what you're looking for:</p>
  
  <pre><code>{% set someEntries = craft.entries({
      level: 1,
      id: '1,2,3,4,5',
      myOtherField: 'and, not blue, not green'
  }) %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-30T21:33:47.200Z
Answers.LastActivityDate: 2017-06-30T21:33:47.200Z
Answers.UserDisplayName: Brad Bell
Body: <p>I'm trying to return entries based on some criteria. I exclude entries with a given value like this:</p>
  
  <pre><code>{% set someEntries = craft.entries({
      level: 1,
      id: '1,2,3,4,5',
      myOtherField: 'not blue'
  }) %}
  </code></pre>
  
  <p>But it doesn't work if I try to exclude by multiple values:</p>
  
  <pre><code>{% set someEntries = craft.entries({
      level: 1,
      id: '1,2,3,4,5',
      myOtherField: 'not blue and not green'
  }) %}
  </code></pre>
  
  <p>It's not in <a href="https://craftcms.com/docs/templating/elementcriteriamodel" rel="nofollow noreferrer">the docs</a> and I've tried a few different syntax but had no luck.</p>
  
Tags: <entries><conditional><params>
Title: Using AND with craft.entries()
ThreadText: # Using AND with craft.entries()
  
  (Asked by: username_0 on 2017-06-30)
  
  I'm trying to return entries based on some criteria. I exclude entries with a given value like this:
  
  ```
  {% set someEntries = craft.entries({
      level: 1,
      id: '1,2,3,4,5',
      myOtherField: 'not blue'
  }) %}
  
  ```
  
  But it doesn't work if I try to exclude by multiple values:
  
  ```
  {% set someEntries = craft.entries({
      level: 1,
      id: '1,2,3,4,5',
      myOtherField: 'not blue and not green'
  }) %}
  
  ```
  
  It's not in [the docs](https://craftcms.com/docs/templating/elementcriteriamodel) and I've tried a few different syntax but had no luck.
  
  **Tags:** entries, conditional, params
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-06-30. Score: 1 | Accepted answer
  
  This should do what you're looking for:
  
  ```
  {% set someEntries = craft.entries({
      level: 1,
      id: '1,2,3,4,5',
      myOtherField: 'and, not blue, not green'
  }) %}
  
  ```
  
  
  ---
  
  