Contact

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

    Difficulty Level: Advanced. This post assumes a strong understanding of HubSpot tools and technical knowledge. Insutructions are given as guidelines and may require additional customisation.

    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

    Written by: Stephanie O'Gay Garcia Orginally Published: October 12, 2019 Last Updated: October 12, 2019

    Thank you! I appreciate the feedback 😊

    Sorry to hear that! 🙁

    I'd appreciate if you could take a moment to let me know how I can improve this article.

    New call-to-action
    hand-drawn-monitor-and-mouse

    Looking for a HubSpot website developer?

    Let me help you with website themes, templates, page setup and custom modules. 

    Get in touch

    Stephanie O'Gay Garcia

    Hi! 👋 I'm a freelance HubSpot Website Developer based in Toronto (Canada). Give me a shout if you have questions about this post or there's anything I can help you with.