I have a client who needs the flexibility to add new user groups in the future to allow access to only certain sections etc.

Anyone in these user groups will appear on the website team page, so what I need to do is to exclude our admin group (and an ex employees group!)

Currently i'm chaining the groups to include as per:

{% set params = { group: 'groupB,groupC,etc,etc,etc'} %}
{% for team in craft.users(params) %}

Is there a way of telling it to just exclude groupA instead?

1 Answer 1


You can do that like so:

{% set params = { group: 'and, not groupX, not groupY' } %}

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.