Skip to Content

Apply specific styling to the first page of your HubSpot blog listings

⚠️ Note that this post hasn't been updated for at least a year and the information may be outdated, proceed with caution! (Last updated: October 12, 2019)

Sometimes you might just want to apply styling to the first page in your blog listings, such as a hero banner or featured posts.

To do this, you can use the {% raw %}current_page_num blog variable, like this: 

{% if current_page_num == 1 %}
  {# Code for content specific to your first page #}
{% endif %}

You can add this code into your blog listing template, on a custom module used on your listings template or in the Wrapping HTML on a module or group: 

Blog listings - wrapping HTML

←  Previous Article

HubSpot Custom Module Tutorial: Image with Colour Overlay

Next Article  →

Remove the wrapper from a field in a HubSpot custom module

Contact

Get help from a HubSpot CMS Expert

  • Custom HubSpot themes and reusable and easy-to-use HubSpot templates and modules
  • Technical support and guidance on the HubSpot CMS