[Fixed]-Wrong related page in Wagtail CMS

1👍

The problem is with the code you’re using to output the links:

{% for related in self.related_posts.all %}{{ related.page }}{% endfor %}

Here related is a PostRelatedPageItem object, and related.page points back to the page it’s attached to. You should use related.link_page instead.

👤gasman

Leave a comment