CMS Development

Konclude
Member

Get today's date to use in recent blog posts

SOLVE

I'd like to get today's day to use when displaying related psots: 

 

{% related_blog_posts start_date="2021-02-08", end_date="2018-06-10", limit=10 callback="blog_post_formatter" %}

 

I'd like to dynamically generate the start date. Is that possible in HUBL?

0 Upvotes
1 Accepted solution
piersg
Solution
Key Advisor

Get today's date to use in recent blog posts

SOLVE

Wouldn't using blog_recent_tag_posts be the same thing? Get related posts (by tag), sorted by most recent first (i.e. today).

 

 

View solution in original post

Konclude
Member

Get today's date to use in recent blog posts

SOLVE

Thank you guys for everything. I appreciate your assistance. All is sorted now.

dennisedson
Community Manager
Community Manager

Get today's date to use in recent blog posts

SOLVE

Hi @Konclude those parameters are not available in that function. 

Am I understanding this correctly.  You want to loop through only a particular period of time and always have the most recent be the current day.

@piersg , @amwilie what do you think?

Thanks,

Dennis




HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show
0 Upvotes
piersg
Solution
Key Advisor

Get today's date to use in recent blog posts

SOLVE

Wouldn't using blog_recent_tag_posts be the same thing? Get related posts (by tag), sorted by most recent first (i.e. today).