CMS Development

Janette
Participant

images in recent posts module

SOLVE

Hi Good Day!!

 

I have my page of Blog ann this a I have a side-bar with recent posts and I would like to in this module appear an image of each recent post show in this module.:

 

It is possible? How can I do that? 

0 Upvotes
1 Accepted solution
Stephanie-OG
Solution
Key Advisor

images in recent posts module

SOLVE

Hi Janette, I believe that the Recent Posts module only allows limited customization and I can't seem to see a way to display just the image, but you could use a custom module with HubL to specify exactly what you want to add. This link has more on blog_recent_posts. 

 

Something like: 

 

{{ blog_recent_posts('default', 5) }}
{% set rec_posts = blog_recent_posts('default', 5) %}
{% for rec_post in rec_posts %}
    <div class="post-featured-image">{{ rec_post.featured_image }}</div>
{% endfor %}

 

You can style it by styling class

post-featured-image

 

View solution in original post

2 Replies 2
Stephanie-OG
Solution
Key Advisor

images in recent posts module

SOLVE

Hi Janette, I believe that the Recent Posts module only allows limited customization and I can't seem to see a way to display just the image, but you could use a custom module with HubL to specify exactly what you want to add. This link has more on blog_recent_posts. 

 

Something like: 

 

{{ blog_recent_posts('default', 5) }}
{% set rec_posts = blog_recent_posts('default', 5) %}
{% for rec_post in rec_posts %}
    <div class="post-featured-image">{{ rec_post.featured_image }}</div>
{% endfor %}

 

You can style it by styling class

post-featured-image

 

Janette
Participant

images in recent posts module

SOLVE

Hi @Stephanie-OG

 

Thanks for the information.

 

Regards

0 Upvotes