Answers.Body: <p>Yes. It is possible, you need to specify the craft category and set the group parameter on it and fetch the categories with <code>.all()</code>.</p>
  
  <pre><code>{% set categories = myCategoryQuery.all() %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-17T01:22:20.603Z
Answers.LastActivityDate: 2019-04-22T22:38:56.330Z
Answers.LastEditDate: 2019-04-22T22:38:56.330Z
Answers.UserDisplayName: Priti Rathod
Body: <p>I have two different sections that share the same category group that I want to display both on browser at the same time only if the category is the same. Doing that in Craft CMS is possible?</p>
  
  <p>Thank you.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-16T22:32:26.367Z
Comments.Text: Can you please add more details to your question? Are you trying to create a related entries view that searches by category in two sections? Is this on a single entry view or an overview entry listing page?
Comments.UserDisplayName: Simon Kuran
Tags: <templating><categories>
Title: Two entries same category
ThreadText: # Two entries same category
  
  (Asked by: username_0 on 2019-04-16)
  
  I have two different sections that share the same category group that I want to display both on browser at the same time only if the category is the same. Doing that in Craft CMS is possible?
  
  Thank you.
  
  **Tags:** templating, categories
  
  > **Comments:**
  > **username_1**: Can you please add more details to your question? Are you trying to create a related entries view that searches by category in two sections? Is this on a single entry view or an overview entry listing page?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-04-17. Score: 1 | Accepted answer
  
  Yes. It is possible, you need to specify the craft category and set the group parameter on it and fetch the categories with `.all()`.
  
  ```
  {% set categories = myCategoryQuery.all() %}
  
  ```
  
  
  ---
  
  