Get entries which have a certain category assigned to them 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') %}
        &lt;h3&gt;{{ entry.title }}&lt;/h3&gt;
    {% endfor %}


But i figured wrong! Any ideas would be gratefully received!
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 %}
        &lt;p&gt;{{ entry.title }}&lt;/p&gt;
    {% 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') %}