blog_popular_posts function does not work properly

I am creating a website using HubSpot CMS.
I’m creating a blog article list module, but I’m having trouble with it.
If anyone has any knowledge, I would like to hear from you.

■Summary
The module (HTML + Hubl) that displays a list of articles posted in a blog article was created while checking the developer documentation (HubL関数 - HubSpot docs).
The code is below.

<div class="popular_posts">
{% set pop_posts = blog_popular_posts("default", 5) %}
 <div class="popular">
 {% for pop_post in pop_posts %}
 <a href="{{pop_post.absolute_url}}" class="popular-articles">
 {% if pop_post.post_list_summary_featured_image %}
 <img src="{{ pop_post.post_list_summary_featured_image }}" class="popular-articles-image" alt="{{ pop_post.featured_image_alt_text | escape }}">
 {% endif %}
 <h3 class="popular-articles-title">{{ pop_post.name }}</h3>
 </a>
 {% endfor %}
 </div>
</div>

When I preview it from the module creation screen, it displays correctly, but when I place a module created with the design tool, nothing is displayed when I preview it.

■What I tried
- When I placed the module on another page, it was displayed correctly in this case. Based on this, I predict that the direct cause is that there is no article on the page where you are trying to place it, but is this understanding correct?

If anyone knows the cause, please let me know. If you need any other information, please feel free to contact us and we will share it with you.

Hi @yfukuta

I have a feeling this has something to do with the “default” selected blog but I can’t quite pin it. I’m testing on my account (which has multiple blogs) and, when I replace “default” with a blog ID (which you can enter manually in the code or by using a blog field in your module so that it can be updated by the content editor), it works.

I’m trying to figure out how you actually see or set the default blog and can’t seem to find any information on it. There’s this post, but I don’t think it answers the question.

Are you ok with adding the blog ID or do you need to use “default” for any particular reason?