<p>Try to set both states in single/double quotes: </p>

<pre><code>{% set allEntries = craft.entries.status('live', 'pending').section('sectionName').relatedTo(category).find() %}
</code></pre>

CC BY-SA 3.0
2014-07-27T20:32:29.637Z
2014-07-27T20:32:29.637Z
carlcs
<p>For Craft CMS 3:</p>

<pre><code>{% set allEntries = craft.entries.status('pending, live').section('sectionName').relatedTo(category).find() %}
</code></pre>

CC BY-SA 4.0
2018-08-08T19:53:10.080Z
2018-08-08T19:53:10.080Z
SoHo
<p>You can get all entries regardless of status with <code>.status(null)</code>:</p>

<pre><code>{% set allEntries =  craft.entries.section('sectionName').relatedTo(category).status(null).find() %}
</code></pre>

CC BY-SA 3.0
2014-07-27T20:28:59.300Z
This will also show all 'disabled' and 'expired' entries though.
carlcs
CC BY-SA 3.0
2014-07-27T20:02:24.980Z
2014-07-27T20:02:24.980Z
Marion Newlevant
<p>I have this in my listings template, but the 'pending' parameter does not seem to work.</p>

<pre><code>{% set urlCat = craft.request.getSegment(3) %}
{% set category = craft.categories.slug( urlCat ) %}
{% set allEntries =  craft.entries.status('live, pending').section('sectionName').relatedTo(category).find() %}
</code></pre>

<p>This seems to only return 'live' entries even though I do have 'pending' specified.  I've tried this several ways and cannot seem to make it work.</p>

<p>The strange thing is that this seems to work fine on my single entry page where I have:</p>

<pre><code>{% set entry = craft.entries.section('sectionName').slug(selected).status("live, pending").first() %}
</code></pre>

<p>Any ideas?  Thanks :)</p>

CC BY-SA 3.0
2014-08-15T12:59:38.390Z
Have you tried my answer, pixel? Setting `status` to `null` doesn't return only 'live' and 'pending' entries!
carlcs
<status><pending><array>
How do I find live and pending entries when using an array?
# How do I find live and pending entries when using an array?

(Asked by: username_0 on 2014-07-27)

I have this in my listings template, but the 'pending' parameter does not seem to work.
{% set urlCat = craft.request.getSegment(3) %}
{% set category = craft.categories.slug( urlCat ) %}
{% set allEntries =  craft.entries.status('live, pending').section('sectionName').relatedTo(category).find() %}

This seems to only return 'live' entries even though I do have 'pending' specified.  I've tried this several ways and cannot seem to make it work.
The strange thing is that this seems to work fine on my single entry page where I have:
{% set entry = craft.entries.section('sectionName').slug(selected).status("live, pending").first() %}

Any ideas?  Thanks :)

**Tags:** status, pending, array
> **Comments:**
> **username_1**: Have you tried my answer, pixel? Setting `status` to `null` doesn't return only 'live' and 'pending' entries!  

---

## 3 answers

### Answer by username_3 on 2014-07-27. Score: 4 | Accepted answer

You can get all entries regardless of status with .status(null):
{% set allEntries =  craft.entries.section('sectionName').relatedTo(category).status(null).find() %}

> **Comments:**
> **username_1**: This will also show all 'disabled' and 'expired' entries though.  

---

### Answer by username_1 on 2014-07-27. Score: 3

Try to set both states in single/double quotes: 
{% set allEntries = craft.entries.status('live', 'pending').section('sectionName').relatedTo(category).find() %}


---

### Answer by username_2 on 2018-08-08. Score: 1

For Craft CMS 3:
{% set allEntries = craft.entries.status('pending, live').section('sectionName').relatedTo(category).find() %}


---

