I know this question has been asked before but I'm still not able to solve the issue in this particular situation. I want to remove one fixed(#95) entry id and the current entry.id from the query.

{% set entries = craft.entries.section('section').level(1).id('and, not ~ entry.id, not 95').all() %}

The result being only the fixed (#95) entry.id is removed from the query.

1 Answer 1


You can do like

{% set entries = craft.entries.section('section').level(1).id(['not', entry.id, 95]).all() %}

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.