CMS Development

Kwaltrip
Participant

Blog Link

SOLVE

Hi,

 

Is there a way to have a homepage link to a blog that auto updates the link to the most recent blog post?

0 Upvotes
1 Accepted solution
Phil_Vallender
Solution
Most Valuable Member | Diamond Partner
Most Valuable Member | Diamond Partner

Blog Link

SOLVE

Hi @Kwaltrip

 

HubSpot blogs have an RSS feed that a developer can probably embed in your homepage for you. 

 

There is also an RSS module in HubSpot's standard modules. More info here: RSS listing

 

Hope this helps.

Phil Vallender | HubSpot Website Agency

View solution in original post

2 Replies 2
Phil_Vallender
Solution
Most Valuable Member | Diamond Partner
Most Valuable Member | Diamond Partner

Blog Link

SOLVE

Hi @Kwaltrip

 

HubSpot blogs have an RSS feed that a developer can probably embed in your homepage for you. 

 

There is also an RSS module in HubSpot's standard modules. More info here: RSS listing

 

Hope this helps.

Phil Vallender | HubSpot Website Agency
jonlcrow
Member

Blog Link

SOLVE

You might try something like:

 {% set rec_posts = blog_recent_posts('default', 1) %}
{% for rec_post in rec_posts %}
<div class="post-title"><a href="{{ content.absolute.url }}">{{ content.name }}</a></div>
{% endfor %}

 Where 'default' is the blog you wish to pull from. You can find the ID of the blog when you are in that blog's dashboard in the URL. For example... 

 

https://app.hubspot.com/blog/456789/blogs/5624864654/manage/posts/all

 

Where 456789 is your HubID 5624864654 would be the blog ID you would use to replace default. You can find out more about HubL coding and variables here.

 

Cheers,

Jonathan

0 Upvotes