<p>Not really the answer you are looking for, but it might be easier to change the tag <code>hidden</code> to a checkbox or lightswitch field and add a condition to the <code>for..in</code> loop, as explained in the <a href="http://twig.sensiolabs.org/doc/tags/for.html#adding-a-condition" rel="nofollow">twig documentation</a>, which may do what you need and keep the query count lower.</p>

<pre><code>{% for entry in allEntries if not entry.hidden %}
    ...
{% endfor %}
</code></pre>

CC BY-SA 3.0
2014-10-19T18:13:57.423Z
2014-10-19T18:13:57.423Z
Douglas McDonald
<p>So I hope I am explaining this correctly. </p>

<p>I have some entries with a tag called 'hidden'. In my blog layout I want to exclude those entries.</p>

<p>I have the following:</p>

<pre><code>{% set tag = craft.tags.name('hidden') %}
{% set hiddenentry = craft.entries.section('blog').relatedTo(tag).find() %}
{% set allentry = craft.entries.section('blog').limit(5).find() %}
{% set unhidden = allentry|without(hiddenentry) %}

{% for entry in unhidden %}
    &lt;div class="content"&gt;
        &lt;article&gt;
            &lt;h2&gt;&lt;a href="{{ entry.url }}"&gt;{{ entry.title }}&lt;/a&gt;&lt;/h2&gt;
            &lt;p class="date"&gt;Posted on {{ entry.postDate.format('F d, Y') }}&lt;/p&gt;
            {{ entry.body.getPage(1) }}
            {# {{ entry.summary }} #}
            &lt;button&gt;&lt;a href="{{ entry.url }}"&gt;Continue reading&lt;/a&gt;&lt;/button&gt;
        &lt;/article&gt;
    &lt;/div&gt;
{% endfor %}
</code></pre>

<templating>
List all entries except 'hidden'
# List all entries except 'hidden'

(Asked by: username_0 on 2014-10-19)

So I hope I am explaining this correctly. 
I have some entries with a tag called 'hidden'. In my blog layout I want to exclude those entries.
I have the following:
{% set tag = craft.tags.name('hidden') %}
{% set hiddenentry = craft.entries.section('blog').relatedTo(tag).find() %}
{% set allentry = craft.entries.section('blog').limit(5).find() %}
{% set unhidden = allentry|without(hiddenentry) %}

{% for entry in unhidden %}
    
        
            {{ entry.title }}
            Posted on {{ entry.postDate.format('F d, Y') }}
            {{ entry.body.getPage(1) }}
            {# {{ entry.summary }} #}
            Continue reading
        
    
{% endfor %}

**Tags:** templating


---

## 1 answers

### Answer by username_1 on 2014-10-19. Score: 1 | Accepted answer

Not really the answer you are looking for, but it might be easier to change the tag hidden to a checkbox or lightswitch field and add a condition to the for..in loop, as explained in the twig documentation, which may do what you need and keep the query count lower.
{% for entry in allEntries if not entry.hidden %}
    ...
{% endfor %}


---

