# Custom post types in Hubspot

**URL:** <https://community.hubspot.com/t/custom-post-types-in-hubspot/110017>\
**Category:** CMS Development\
**Created:** [June 25, 2024, 7:31am UTC](https://community.hubspot.com/t/custom-post-types-in-hubspot/110017 "2024-06-25T07:31:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![FvanderKloot](https://avatars.discourse-cdn.com/v4/letter/f/a6a055/32.png) [@FvanderKloot](https://community.hubspot.com/u/FvanderKloot)\
**Post date:** [June 25, 2024, 7:31am UTC](https://community.hubspot.com/t/custom-post-types-in-hubspot/110017/1 "2024-06-25T07:31:19Z")

</div>

I’m currently working on a website for a company that offers multiple courses, services, … Each course has a lot of information, so the best practice would be to create a blog template for those detail pages, but If I do that can I create card listings to show on other pages?

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [June 25, 2024, 7:52am UTC](https://community.hubspot.com/t/custom-post-types-in-hubspot/110017/2 "2024-06-25T07:52:53Z")

</div>

Hi @FvanderKloot,

creating courses with a blog is a great way but could be bound to quite a lot of custom development(listing & post templates, emails, maybe special modules, lists…)

As for your question:  
Yes it’s possible to display “course cards” on other pages.

One option would be to use the [blog\_recent\_posts function](https://developers.hubspot.com/docs/cms/hubl/functions#blog-recent-posts) while creating a custom module.

Here’s an example of a module with customizable blog(blog function) and amount(number) setting:

```lia-code-sample
{% set rec_posts = blog_recent_posts(module.blog_select, module.amount_of_posts) %}
<div class="recent-courses-wrapper">
{% for rec_post in rec_posts %}
 <div class="post-title">{{ rec_post.name }}</div>
{% endfor %}
</div>

```

A few tips:

- If you have Content Hub Professional you could think about creating [membership pages](https://developers.hubspot.com/docs/cms/data/memberships) and create a whole course area with a dedicated login and user area
- If you have Marketing Enterprise you could think about creating those courses with [custom objects](https://developers.hubspot.com/blog/essentials-for-getting-started-with-custom-objects) so you have the ability to create “CRM-powered” pages

If you need support or have further questions - drop me a DM. I’ll be happy to talk in detail

best,

Anton

---

<div class="post-metadata">

**Author:** ![FvanderKloot](https://avatars.discourse-cdn.com/v4/letter/f/a6a055/32.png) [@FvanderKloot](https://community.hubspot.com/u/FvanderKloot)\
**Post date:** [July 11, 2024, 3:53pm UTC](https://community.hubspot.com/t/custom-post-types-in-hubspot/110017/3 "2024-07-11T15:53:40Z")

</div>

Thanks!

If I try to implement the featured image it just gives the URL. Do you know how to show the actual image?

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [July 11, 2024, 4:00pm UTC](https://community.hubspot.com/t/custom-post-types-in-hubspot/110017/4 "2024-07-11T16:00:39Z")

</div>

Hi @FvanderKloot,

you have to put it in an img-tag like

`<img src="{{ rec_post.featured_image }}" alt="{{ rec_post.featured_image_alt }}" class="SOME-CLASS"> {# please note that the featured image alt tag is different than a regular image function #}`

best,

Anton

---

<div class="post-metadata">

**Author:** ![FvanderKloot](https://avatars.discourse-cdn.com/v4/letter/f/a6a055/32.png) [@FvanderKloot](https://community.hubspot.com/u/FvanderKloot)\
**Post date:** [July 11, 2024, 6:01pm UTC](https://community.hubspot.com/t/custom-post-types-in-hubspot/110017/5 "2024-07-11T18:01:49Z")

</div>

Thank you so much!

Just one last question. In my blog template there’s a module field “content.start\_date” and a field “content.location”. I want to show that in the listing, but I can’t seem to import it. Do you know if it’s possible?
