CMS Development

Konclude
Mitglied

Get today's date to use in recent blog posts

lösung

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 Akzeptierte Lösung
piersg
Lösung
Autorität

Get today's date to use in recent blog posts

lösung

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

 

 

Lösung in ursprünglichem Beitrag anzeigen

3 Antworten
Konclude
Mitglied

Get today's date to use in recent blog posts

lösung

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

dennisedson
HubSpot-Produktteam
HubSpot-Produktteam

Get today's date to use in recent blog posts

lösung

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 , @alyssamwilie what do you think?

0 Upvotes
piersg
Lösung
Autorität

Get today's date to use in recent blog posts

lösung

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