<p>There's a typo in your code :) You misspelled relatedTo. I'm assuming that's the issue because other that than, the code looks like it should work.</p>

CC BY-SA 3.0
2016-08-18T07:50:21.477Z
What a donut! Good spot @user5400 which proves it's always good to walk away from it when it's not happening and take a fresh look later on. Cheers
Lettie
CC BY-SA 3.0
2016-08-17T18:02:45.537Z
2016-08-17T18:02:45.537Z
user5400
<p>I've looked at several answers on here regarding this one and as far as I can make out this should bring out all entries related to a specific category slug. However it just seems to be returning all entries regardless of whether it's related or not? What am I missing? Also in case it makes a difference there is one category level but an entry can have multiple categories selected.</p>

<pre><code>{% set category = craft.categories.group('markets').slug('marine').first() %}
{% set products = craft.entries.section('products').realtedTo(category).limit(null) %}
{% for product in products %}
    {{ product.title }}
{% endfor %}
</code></pre>

<relatedto>
RelatedTo does not seem to work!
# RelatedTo does not seem to work!

(Asked by: username_0 on 2016-08-17)

I've looked at several answers on here regarding this one and as far as I can make out this should bring out all entries related to a specific category slug. However it just seems to be returning all entries regardless of whether it's related or not? What am I missing? Also in case it makes a difference there is one category level but an entry can have multiple categories selected.
{% set category = craft.categories.group('markets').slug('marine').first() %}
{% set products = craft.entries.section('products').realtedTo(category).limit(null) %}
{% for product in products %}
    {{ product.title }}
{% endfor %}

**Tags:** relatedto

---

## 1 answers

### Answer by username_1 on 2016-08-17. Score: 3 | Accepted answer

There's a typo in your code :) You misspelled relatedTo. I'm assuming that's the issue because other that than, the code looks like it should work.

> **Comments:**
> **username_0**: What a donut! Good spot @user5400 which proves it's always good to walk away from it when it's not happening and take a fresh look later on. Cheers  

---

