4

I want to show a list of entries that excludes two or more specifically by id.

This works:

{% for entry in craft.entries.section('boardOfDirectors').id('not 12') %}

This does not:

{% for entry in craft.entries.section('boardOfDirectors').id('not 12,18') %}

Is this possible? Anyone know the correct syntax?

Lindsey D
  • 23,974
  • 5
  • 53
  • 110
Britchie
  • 215
  • 2
  • 9

1 Answers1

7

You need to start with and, and put not in front of each ID...

{% for entry in craft.entries.section('boardOfDirectors').id('and, not 12, not 18') %}
Lindsey D
  • 23,974
  • 5
  • 53
  • 110