Answers.Body: <p>OK resolved now - client slug mis-spelling! thx</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-27T11:16:27.380Z
Answers.LastActivityDate: 2019-06-27T11:16:27.380Z
Answers.UserDisplayName: joomkit
Body: <p>I have two categories, Annual Reviews and Publications.
  I want to get all entries from these and paginate them.</p>
  
  <p>The code I am using is fine for one category - both work individually, but as soon as the criteria contains two categories i get zero results no errors. I have tried using 'one()' on the initial categories as I only want category returned. 
  What am I missing? (using Craft Pro 3.1.31)</p>
  
  <pre><code>{% set publications = craft.categories.group('resources').slug('publications') %}
  {% set annualreviews = craft.categories.group('resources').slug('annualreviews') %}
  
  {% set entries = craft.entries({
  section: 'resources',
  relatedTo: [
  'and',
  { targetElement: publications },
  { targetElement: annualreviews }
  ]
  }).limit('10').orderBy('title') %}
  
  {% paginate entries as pageInfo, pageEntries %}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-06-25T22:11:07.493Z
Comments.Text: Are you sure you're wanting `'and'`? Or are you meaning "get all entries that have a `publications` _or_ `annualreviews` category?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-06-27T11:15:42.117Z
Comments.Text: OK resolved now - client slug mis-spelling! thx
Comments.UserDisplayName: joomkit
Tags: <categories><relations><relatedto>
Title: Getting entries from multiple categories
ThreadText: # Getting entries from multiple categories
  
  (Asked by: username_0 on 2019-06-25)
  
  I have two categories, Annual Reviews and Publications.
  I want to get all entries from these and paginate them.
  
  The code I am using is fine for one category - both work individually, but as soon as the criteria contains two categories i get zero results no errors. I have tried using 'one()' on the initial categories as I only want category returned.
  What am I missing? (using Craft Pro 3.1.31)
  
  ```
  {% set publications = craft.categories.group('resources').slug('publications') %}
  {% set annualreviews = craft.categories.group('resources').slug('annualreviews') %}
  
  {% set entries = craft.entries({
  section: 'resources',
  relatedTo: [
  'and',
  { targetElement: publications },
  { targetElement: annualreviews }
  ]
  }).limit('10').orderBy('title') %}
  
  {% paginate entries as pageInfo, pageEntries %}
  
  ```
  
  **Tags:** categories, relations, relatedto
  
  > **Comments:**
  > **username_1**: Are you sure you're wanting `'and'`? Or are you meaning "get all entries that have a `publications` _or_ `annualreviews` category?  
  > **username_0**: OK resolved now - client slug mis-spelling! thx  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-06-27. Score: 1
  
  OK resolved now - client slug mis-spelling! thx
  
  
  ---
  
  