<p>If you want to leave the data as-is, you could just fetch the “related” interaction entries like this:</p>

<pre class="lang-twig prettyprint-override"><code>{% for interaction in craft.entries.section('interactions').relatedPostSlug(enry.slug) %}
    {{ interaction.comment }}
    ...
{% endfor %}
</code></pre>

CC BY-SA 3.0
2014-09-07T15:24:55.450Z
Nice one, that looks good (though I presume less efficient?) Thanks a lot!
Shane Hudson
CC BY-SA 3.0
2014-09-07T15:21:20.220Z
2014-09-07T15:21:20.220Z
Brandon Kelly
<p>I've imported Wordpress comments into a post type called 'comments' in a section called 'interactions'. I have the slug stored in 'relatedPostSlug'.</p>

<p>How would I relate the 'relatedPostSlug' to the actual posts with that slug?</p>

CC BY-SA 3.0
2014-09-07T13:28:08.240Z
I have said 'afterwards' in the title because these items already exist.
Shane Hudson
<relations>
Can I Relate Afterwards
# Can I Relate Afterwards

(Asked by: username_0 on 2014-09-07)

I've imported Wordpress comments into a post type called 'comments' in a section called 'interactions'. I have the slug stored in 'relatedPostSlug'.

How would I relate the 'relatedPostSlug' to the actual posts with that slug?

**Tags:** relations

> **Comments:**
> **username_0**: I have said 'afterwards' in the title because these items already exist.  

---

## 1 answers

### Answer by username_1 on 2014-09-07. Score: 2 | Accepted answer

If you want to leave the data as-is, you could just fetch the “related” interaction entries like this:
{% for interaction in craft.entries.section('interactions').relatedPostSlug(enry.slug) %}
    {{ interaction.comment }}
    ...
{% endfor %}

> **Comments:**
> **username_0**: Nice one, that looks good (though I presume less efficient?) Thanks a lot!  

---

