<p>I found this to work, although maybe there’s a better method.</p>

<pre><code>{% set excludedCategory = craft.categories.id('100') %}
{% set excludedEntries = craft.entries.section('blog').status('live').relatedTo(excludedCategory).ids() %}

{% set entryIds = craft.entries.section('blog').status('live').ids() | without(excludedEntries) %}
{% set entries = craft.entries.section('blog').status('live').id(entryIds) %}
</code></pre>

CC BY-SA 3.0
2014-11-21T19:56:04.693Z
2014-11-21T19:56:04.693Z
James
<p>I’m aware of the <code>relatedTo()</code> parameter for entries that belong to a category but how can I show entries that are NOT <code>relatedTo()</code> a certain category?</p>

<categories>
How do I show entries that do not have a certain category?
# How do I show entries that do not have a certain category?

(Asked by: username_0 on 2014-11-21)

I’m aware of the `relatedTo()` parameter for entries that belong to a category but how can I show entries that are NOT `relatedTo()` a certain category?

**Tags:** categories


---

## 1 answers

### Answer by username_0 on 2014-11-21. Score: 4 | Accepted answer

I found this to work, although maybe there’s a better method.
{% set excludedCategory = craft.categories.id('100') %}
{% set excludedEntries = craft.entries.section('blog').status('live').relatedTo(excludedCategory).ids() %}

{% set entryIds = craft.entries.section('blog').status('live').ids() | without(excludedEntries) %}
{% set entries = craft.entries.section('blog').status('live').id(entryIds) %}


---

