Hi everyone,
I’m currently developing a “Recent Blog Post” module in HubSpot and am encountering an issue when trying to fetch blog content using the post_list_content function. My goal is to display a truncated version of each post’s description, but I’m running into a problem with the post_list_content.
{% set rec_posts = blog_recent_posts(module.choose_blog, module.number_of_blog_you_want_to_fetch) %} {% for rec_post in rec_posts %} <div> {{ rec_post.post_list_content | striptags | truncate(150, true) }} </div> {% endfor %}
The code works as expected when used on a blog listing page. However, when I use it within the recent blog post function, post_list_content doesn’t return the expected description.
Any insights or advice would be greatly appreciated!
Thank you!