Answers.Body: <p>You could use Craft's <a href="http://buildwithcraft.com/docs/templating/functions#shuffle"><code>shuffle()</code></a> function to randomize your <code>postDate</code> ordered array of entry models:</p>
  
  <pre><code>{% set entries = craft.entries({
      section: 'entertainmentEvents',
      entertainmentBanner: ':notempty:',
      status: 'live, pending',
      order: 'postDate desc',
      limit: 10
  }) %}
  
  {% set entries = shuffle(entries) %}
  
  {% for entry in entries|slice(0, 3) %}
      ...
  {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-05T15:05:21.917Z
Answers.Text: Damn, beat me to it! I'd update your answer to show how you would limit your 'entries' to 3?
Answers.UserDisplayName: Jamie Wade
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-05T15:06:23.300Z
Answers.Text: Ouups, totally missed that part. Thanks Jamie.
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-05T19:05:25.550Z
Answers.Text: @JamieWade carlcs is an answer ninja.
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-06T10:15:45.237Z
Answers.Text: @BradBell I'll be on my guard next time.
Answers.UserDisplayName: Jamie Wade
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-06T19:10:30.937Z
Answers.Text: Perfect. And in production already. Thanks @carlcs
Answers.UserDisplayName: Tim Print
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-05T15:04:06.697Z
Answers.LastActivityDate: 2015-05-05T15:08:02.267Z
Answers.LastEditDate: 2015-05-05T15:08:02.267Z
Answers.UserDisplayName: carlcs
Body: <pre><code>{% for entry in craft.entries.section('entertainmentEvents').status('live','pending').search('entertainmentBanner:*').order('RAND()').limit(3) %}
  </code></pre>
  
  <p>This is working to show 3 random entries from the full list of all entries with the entertainmentBanner field populated. How would I limit it to the first ten entries by entry date and then 3 at random from within them?</p>
  
Tags: <templating><entries><limit>
Title: How can I show 3 entries at random from within the next 10
ThreadText: # How can I show 3 entries at random from within the next 10
  
  (Asked by: username_0 on 2015-05-05)
  
  ```
  {% for entry in craft.entries.section('entertainmentEvents').status('live','pending').search('entertainmentBanner:*').order('RAND()').limit(3) %}
  
  ```
  
  This is working to show 3 random entries from the full list of all entries with the entertainmentBanner field populated. How would I limit it to the first ten entries by entry date and then 3 at random from within them?
  
  **Tags:** templating, entries, limit
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-05-05. Score: 6 | Accepted answer
  
  You could use Craft's [`shuffle()`](http://buildwithcraft.com/docs/templating/functions#shuffle) function to randomize your `postDate` ordered array of entry models:
  
  ```
  {% set entries = craft.entries({
      section: 'entertainmentEvents',
      entertainmentBanner: ':notempty:',
      status: 'live, pending',
      order: 'postDate desc',
      limit: 10
  }) %}
  
  {% set entries = shuffle(entries) %}
  
  {% for entry in entries|slice(0, 3) %}
      ...
  {% endfor %}
  
  ```
  
  > **Comments:**
  > **username_2**: Damn, beat me to it! I'd update your answer to show how you would limit your 'entries' to 3?  
  > **username_1**: Ouups, totally missed that part. Thanks username_2.  
  > **username_3**: @username_2 username_1 is an answer ninja.  
  > **username_2**: @username_3 I'll be on my guard next time.  
  > **username_0**: Perfect. And in production already. Thanks @username_1  
  
  ---
  
  