<p>If you create a <a href="https://craftcms.com/docs/lightswitch-fields" rel="nofollow noreferrer">Lightswitch field</a> and add it to the section's field layout (let's call it <code>unlisted</code>), then you can query for live entries that have <code>unlisted</code> not checked with:</p>

<pre><code>{% set entries = craft.entries.section('sectionHandle').unlisted('not 1').find() %}

{% for entry in entries %}
    ...
{% endfor %}
</code></pre>

CC BY-SA 3.0
2017-07-14T13:24:11.730Z
Awesome, perfectly what I was looking for. Thank you!
Jake Chapman
CC BY-SA 3.0
2017-07-13T23:10:30.010Z
2017-07-13T23:10:30.010Z
Brad Bell
<p>You could add a lightswitch field as mentioned above, but it seems to me you could just use Craft's built-in Enabled status, no?</p>

<p><a href="https://i.sstatic.net/IdmZe.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/IdmZe.png" alt="Enabled"></a></p>

<p>I do this all the time for blog entries while I'm working on them, so that they are there, but they don't appear in the listings. The bonus is that you don't have to change anything from a templating POV, entries that aren't enabled don't show up by default in <code>craft.entries</code></p>

<p>Second bonus is that you can use the Share link (the arrow next to Live Preview) so share a tokenized URL with others that they can view before the entry is live on the website.</p>

CC BY-SA 3.0
2017-07-16T20:19:10.117Z
2017-07-16T20:19:10.117Z
andrew.welch
<p>I'm trying to figure out the best way to create an entry that is live but "unlisted". I know wordpress has the option, and the same thing you can do when uploading videos to youtube.</p>

<p>What's the best way to have a post be live but not included into the regular posts returned when listing items?</p>

CC BY-SA 3.0
2017-07-13T20:48:00.900Z
Can't tell if I'm underthinking or you're overthinking... but wouldn't a simple lightswitch handle this pretty well?
Lindsey D
<entries>
Creating "unlisted" entry
# Creating "unlisted" entry

(Asked by: username_0 on 2017-07-13)

I'm trying to figure out the best way to create an entry that is live but "unlisted". I know wordpress has the option, and the same thing you can do when uploading videos to youtube.

What's the best way to have a post be live but not included into the regular posts returned when listing items?

**Tags:** entries
> **Comments:**
> **username_1**: Can't tell if I'm underthinking or you're overthinking... but wouldn't a simple lightswitch handle this pretty well?  

---

## 2 answers

### Answer by username_2 on 2017-07-13. Score: 3 | Accepted answer

If you create a Lightswitch field and add it to the section's field layout (let's call it unlisted), then you can query for live entries that have unlisted not checked with:
{% set entries = craft.entries.section('sectionHandle').unlisted('not 1').find() %}

{% for entry in entries %}
    ...
{% endfor %}

> **Comments:**
> **username_0**: Awesome, perfectly what I was looking for. Thank you!  

---

### Answer by username_3 on 2017-07-16. Score: 1

You could add a lightswitch field as mentioned above, but it seems to me you could just use Craft's built-in Enabled status, no?

[![Enabled](https://i.sstatic.net/IdmZe.png)](https://i.sstatic.net/IdmZe.png)

I do this all the time for blog entries while I'm working on them, so that they are there, but they don't appear in the listings. The bonus is that you don't have to change anything from a templating POV, entries that aren't enabled don't show up by default in `craft.entries`

Second bonus is that you can use the Share link (the arrow next to Live Preview) so share a tokenized URL with others that they can view before the entry is live on the website.


---

