Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-27T20:32:29.637Z
Answers.LastActivityDate: 2014-07-27T20:32:29.637Z
Answers.UserDisplayName: carlcs
Answers.Body: <p>For Craft CMS 3:</p>
  
  <pre><code>{% set allEntries = craft.entries.status('pending, live').section('sectionName').relatedTo(category).find() %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-08T19:53:10.080Z
Answers.LastActivityDate: 2018-08-08T19:53:10.080Z
Answers.UserDisplayName: SoHo
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-27T20:28:59.300Z
Answers.Text: This will also show all 'disabled' and 'expired' entries though.
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-27T20:02:24.980Z
Answers.LastActivityDate: 2014-07-27T20:02:24.980Z
Answers.UserDisplayName: Marion Newlevant
Body: <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>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-08-15T12:59:38.390Z
Comments.Text: Have you tried my answer, pixel? Setting `status` to `null` doesn't return only 'live' and 'pending' entries!
Comments.UserDisplayName: carlcs
Tags: <status><pending><array>
Title: How do I find live and pending entries when using an array?
ThreadText: # 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() %}
  
  ```
  
  
  ---
  
  