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?
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?
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 %}