2

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?

Shane Hudson
  • 475
  • 3
  • 12

1 Answers1

2

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 %}
Brandon Kelly
  • 34,307
  • 2
  • 71
  • 137