Answers.Body: <p>This should do what you are looking for:</p>
  
  <pre><code>{% set category = craft.categories.slug('family') %}
  {% set entries = craft.entries.section('images').relatedTo(category).find() %}
  
  {# If there are any entries, loop through them #}
  {% if entries | length %}
  
      {# For each entry we find, do this #}
      {% for entry in entries %}
          &lt;p&gt;{{ entry.title }}&lt;/p&gt;
      {% endfor %}
  
  {% endif %}
  </code></pre>
  
  <p>So we are creating a variable called category, in which you set the category you want to get the list of related entries from.</p>
  
  <p>Next we set a variable called entries, which checks to see if there are any entries in the Image section that relate to the category we set.</p>
  
  <p>It then loops through the entries that we find (if there are any).</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>More than one category group might have the Family category. To get round this you can target a specific category group when we set the category variable:</p>
  
  <pre><code>{% set category = craft.categories.group('categoryGroup').slug('family') %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-07T23:37:37.080Z
Answers.Text: This makes much more sense now. I think the [docs could make it a little more explicit](https://craftcms.com/docs/relations#the-relatedTo-param) in it's examples that you're passing an object as parameters, especially for those of us new to programming (I'm sure there are going to be lots of us as Craft grows!)
Answers.UserDisplayName: Rob
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-07T17:41:14.180Z
Answers.Text: For those coming here via search and using Craft 3, make sure you add `.one()` when retrieving the category, e.g. `{% set category = craft.categories.group('categoryGroup').slug('family').one() %}`, otherwise you won't get any entries matching.
Answers.UserDisplayName: Nate Beaty
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-14T15:11:41.460Z
Answers.Text: Hmm, my problem with that is there may be more than category group that has a category of 'family' in it. Is there a way to specify both category group and category? Thanks btw!!!
Answers.UserDisplayName: John
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-14T15:17:56.197Z
Answers.Text: Sure, no problem, I have edited my answer. Just swap out categoryGroup with the category group you want to target.
Answers.UserDisplayName: Jamie Wade
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-14T13:52:06.703Z
Answers.LastActivityDate: 2014-10-14T15:17:19.187Z
Answers.LastEditDate: 2014-10-14T15:17:19.187Z
Answers.UserDisplayName: Jamie Wade
Body: <p>So, i have a channel called images and a couple of category groups one of which is called "images" which has categories called family, animals, individuals in it.</p>
  
  <p>So, i just want to grab the entries that have one of those categories assigned / related to them.</p>
  
  <p>Figured something like this would do it</p>
  
  <pre><code>    {% for entry in craft.entries.section('images').relatedTo('photography').find('family') %}
          &lt;h3&gt;{{ entry.title }}&lt;/h3&gt;
      {% endfor %}
  </code></pre>
  
  <p>But i figured wrong! Any ideas would be gratefully received!</p>
  
Tags: <entries><categories>
Title: Get entries which have a certain category assigned to them
ThreadText: # Get entries which have a certain category assigned to them
  
  (Asked by: username_0 on 2014-10-14)
  
  So, i have a channel called images and a couple of category groups one of which is called "images" which has categories called family, animals, individuals in it.
  
  So, i just want to grab the entries that have one of those categories assigned / related to them.
  
  Figured something like this would do it
  
  ```
      {% for entry in craft.entries.section('images').relatedTo('photography').find('family') %}
          <h3>{{ entry.title }}</h3>
      {% endfor %}
  
  ```
  
  But i figured wrong! Any ideas would be gratefully received!
  
  **Tags:** entries, categories
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-10-14. Score: 15 | Accepted answer
  
  This should do what you are looking for:
  
  ```
  {% set category = craft.categories.slug('family') %}
  {% set entries = craft.entries.section('images').relatedTo(category).find() %}
  
  {# If there are any entries, loop through them #}
  {% if entries | length %}
  
      {# For each entry we find, do this #}
      {% for entry in entries %}
          <p>{{ entry.title }}</p>
      {% endfor %}
  
  {% endif %}
  
  ```
  
  So we are creating a variable called category, in which you set the category you want to get the list of related entries from.
  
  Next we set a variable called entries, which checks to see if there are any entries in the Image section that relate to the category we set.
  
  It then loops through the entries that we find (if there are any).
  
  **EDIT**
  
  More than one category group might have the Family category. To get round this you can target a specific category group when we set the category variable:
  
  ```
  {% set category = craft.categories.group('categoryGroup').slug('family') %}
  
  ```
  
  > **Comments:**
  > **username_0**: Hmm, my problem with that is there may be more than category group that has a category of 'family' in it. Is there a way to specify both category group and category? Thanks btw!!!  
  > **username_1**: Sure, no problem, I have edited my answer. Just swap out categoryGroup with the category group you want to target.  
  > **username_2**: This makes much more sense now. I think the [docs could make it a little more explicit](https://craftcms.com/docs/relations#the-relatedTo-param) in it's examples that you're passing an object as parameters, especially for those of us new to programming (I'm sure there are going to be lots of us as Craft grows!)  
  > **username_3**: For those coming here via search and using Craft 3, make sure you add `.one()` when retrieving the category, e.g. `{% set category = craft.categories.group('categoryGroup').slug('family').one() %}`, otherwise you won't get any entries matching.  
  
  ---
  
  