how to get posts(articles or blog) from wordpress in hubspot template

New Contributor

In worpdress create two custom post types name are series and financial .

I have cerate template in hubspot in that temaplte how to get posts from custom post types from worpdpress

Reply
0 Upvotes
3 Replies 3
Highlighted
Regular Advisor | Platinum Partner

Hi @manish230793 ,

 

U can use topics in HubSpot to separate your posts in categories, and use this code to create one topic menu:

{% set my_topics = blog_topics('default', 250) %}
<ul>
{% for item in my_topics %}
<li><a href="{{ blog_tag_url(group.id, item.slug) }}">{{ item }}</a></li>
{% endfor %}
</ul>

Look the result without CSS:

menu.PNG

 

Now, u can create the style to configure the layout you need.  Look how the code above stayed, after i configure the CSS in one template that i created:

my-blog.PNG

 

Did this post help solve your problem? If so, please mark it as a solution.

Best regards!

Reply
0 Upvotes
Highlighted
New Contributor

blogs are fetched in WordPress not in Hubspot. All blogs get into Wordpress. I have set custom design Rss feed that template send into mail.

Reply
0 Upvotes
Highlighted
Top Contributor | Platinum Partner

WordPress can provide a feed based on the custom post type, best bet would be to setup the feeds based on the CPT from WP rather than ask HubSpot to filter a single feed from WP that has all the post types in it.

Reply
0 Upvotes