Hi @jerequis
Yes, you can absolutely create sub-pages for your blog in HubSpot—like a /blog/all page that shows different content and layout from your main blog listing at /blog. This is a great way to organize your content better, create custom views for campaigns, or offer users a more tailored experience.
What This Means in HubSpot:
By default, HubSpot gives you one main blog listing page (usually /blog). If you want to build something like /blog/all with its own content, layout, and pagination, here are the tools and steps you’ll use:
Tools You’ll Use:
1.Custom Templates – So you can control how things look and behave on /blog/all.
- Website Pages – Create a new page just like any landing or site page.
- HubL (HubSpot’s coding language) – To pull in blog posts and control pagination.
- (Optional) Redirects – To manage clean URLs if needed.
Steps to Set Up a Custom Blog Sub-Page (/blog/all):
Step 1: Build a Custom Blog Listing Template
- Go to Content > Design Manager.
- Create a new HTML + HubL file. Select Blog Listing as the template type.
- Name it something like custom-blog-all-listing.html.
In this template, use HubL to load blog posts. Here’s a simple example:
{% set blog_posts = blog_recent_posts("default", 9999) %}
{% for post in blog_posts %}
<div class="blog-post">
<h3><a href="{{ post.absolute_url }}">{{ post.name }}</a></h3>
<p>{{ post.post_list_summary_field }}</p>
</div>
{% endfor %}
You can customize this section to show images, dates, authors, etc.
Step 2: Add Pagination
HubSpot doesn’t add pagination automatically on custom pages—you need to code it.
Here’s a simple pagination example:
{% if contents.has_next_page or contents.has_previous_page %}
<div class="pagination">
{% if contents.has_previous_page %}
<a href="{{ blog_page_link(contents.current_page_num - 1) }}">Previous</a>
{% endif %}
{% for page_num in 1..contents.total_pages %}
<a href="{{ blog_page_link(page_num) }}"
{% if page_num == contents.current_page_num %}class="active"{% endif %}>
{{ page_num }}
</a>
{% endfor %}
{% if contents.has_next_page %}
<a href="{{ blog_page_link(contents.current_page_num + 1) }}">Next</a>
{% endif %}
</div>
{% endif %}
Step 3: Create a New Page for /blog/all
Go to Website Pages in your HubSpot account.
Create a new page and choose the custom template you just made.
Set the page URL to /blog/all.
Add any modules or text you want—this is your chance to make this page unique.
If needed, use HubL to filter content, like only showing posts with a certain tag:
{% set featured_posts = blog_recent_tag_posts("default", "featured", 9999) %}
{% for post in featured_posts %}
{# Show your custom post display here #}
{% endfor %}
Step 4: Link to /blog/all from Your Menu or CTA
Make sure users can reach /blog/all by adding it to your navigation or buttons.
Things to Keep in Mind:
SEO: If this page shows the same posts as /blog, make sure to use canonical tags so Google doesn’t see it as duplicate content.
Maintenance: If you create multiple blog listings, use global modules to keep styling consistent.
Use HubDB (optional): If you want even more control (like mixing blog posts with other types of content), HubDB gives you powerful options.
I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.
Thanks!