Issue pulling custom blog post fields within a recent posts module on a blog post template
Hi Everyone-
A client's website has an "Events" blog channel, with a custom module embedded on the template that provides the client with separate fields for the event location, time, registration link, etc.
On the blog listing page, we've updated the blog listing module to display those fields and it works perfectly.
However, when we paste that code into a related posts module that lives at the bottom of the blog post template, it only pulls the event data from the event post you're on, not for each related event.
So if you're on the page for Event 1, the custom field data for Events 2, 3 & 4 in the related post module will only show the data for Event 1. I've pasted the code below. Any help is appreciated.
Issue pulling custom blog post fields within a recent posts module on a blog post template
Figured it out. For reference, we're using a child theme of Growth, and we've copied the Recent Posts module to the child theme. In the blog listing module, they used {% for content ... %} and the Recent Posts module used {% for post ... %} which is why the same code wasn't working.
Changed to this:
{% if post.widgets.module_16619998651649.body.event_date_time %} <strong>Date:</strong> {{ datetimeformat(post.widgets.module_16619998651649.body.event_date_time,'%B %e, %Y') }}