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?

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') %}
2
  • I've tried this (and some other variants) and its just not working... – Britchie Mar 31 '16 at 17:33
  • 2
    Looks like I skipped a step... Try putting and at the beginning. See this other SE post for more information. – Lindsey D Mar 31 '16 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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