---
title: Check if blog post comments are enabled on HubSpot using HubL
description: Sometimes you may want to use a snippet to check if the blog comments have been enabled to display a particular snippet of code in your HubSpot blog template. 
image: https://www.stephanieogaygarcia.com/hubfs/Website%20Imagery/Stephanie%20OGay%20Garcia%20-%20HubSpot%20CMS%20Designer%20and%20Developer%20L.png
---

[Skip to Content](https://www.stephanieogaygarcia.com/hubspot-website-development/check-if-blog-post-comments-are-enabled-on-hubspot-using-hubl#main-content)

[![Stephanie O'Gay Garcia](https://www.stephanieogaygarcia.com/hubfs/Logos/stephanieogaygarcia_logo.svg "Stephanie O'Gay Garcia")](https://www.stephanieogaygarcia.com/)

Open Navigation

- [About](https://www.stephanieogaygarcia.com/about)
- [Services](https://www.stephanieogaygarcia.com/services)
- [Products](https://www.stephanieogaygarcia.com/shop)
- [Work](https://www.stephanieogaygarcia.com/portfolio-work)
- [Blog](https://www.stephanieogaygarcia.com/hubspot-website-development)
- [Contact](https://www.stephanieogaygarcia.com/contact)

- [About](https://www.stephanieogaygarcia.com/about)
- [Services](https://www.stephanieogaygarcia.com/services)
- [Products](https://www.stephanieogaygarcia.com/shop)
- [Work](https://www.stephanieogaygarcia.com/portfolio-work)
- [Blog](https://www.stephanieogaygarcia.com/hubspot-website-development)
- [Contact](https://www.stephanieogaygarcia.com/contact)

[HubSpot Sprocket Icon  HubSpot Website Development ](https://www.stephanieogaygarcia.com/hubspot-website-development)

[hubl, ](https://www.stephanieogaygarcia.com/hubspot-website-development/tag/hubl) [blog](https://www.stephanieogaygarcia.com/hubspot-website-development/tag/blog)

# Check if blog post comments are enabled on HubSpot using HubL

 Technical Difficulty: Intermediate

 Written by [ Stephanie O'Gay Garcia ](https://www.stephanieogaygarcia.com/hubspot-website-development/author/stephanie-ogay-garcia)

 First Published:  December 13, 2019

 Last Updated:  January 6, 2020

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

Sometimes you may want to use a snippet to check if the blog comments have been enabled to display a particular snippet of code in your HubSpot blog template. 

I wasn't able to find anything specific in the documentation but have found the following condition to work:

`{% raw %}{% if content_group.allow_comments %}   {# Your code here #} {% endif %}`

You can use this in a coded template, a custom module or in the Wrapping HTML section in a Module group in your blog template, like this: 

![Wrapping HTML - If comments are enabled](https://www.stephanieogaygarcia.com/hs-fs/hubfs/HubSpot%20Website%20Development%20Post%20Images/Wrapping%20HTML%20-%20If%20comments%20are%20enabled.png?width=1583&name=Wrapping%20HTML%20-%20If%20comments%20are%20enabled.png)

In the above case I found it useful so that the padding from my `page-center` and `content-wrapper` classes won't add extra whitespace if comments are disabled.

I found this by using the Developer Info viewer (see below) - you can use dot notation to find the values of any of the information that appears there.

![HubSpot Tools - Developer Info](https://www.stephanieogaygarcia.com/hs-fs/hubfs/HubSpot%20Website%20Development%20Post%20Images/HubSpot%20Tools%20-%20Developer%20Info.png?width=172&name=HubSpot%20Tools%20-%20Developer%20Info.png)

Check out my post on [adding custom fields to HubSpot blog posts](https://www.stephanieogaygarcia.com/hubspot-website-development/adding-custom-fields-to-hubspot-blog-posts) for ways to create your own fields on posts and similarly access them on there or on the listings page. 

If you found this helpful, buy me a coffee! ❤️

←  Previous Article

[Center align a HubSpot form submit button](https://www.stephanieogaygarcia.com/hubspot-website-development/center-align-a-hubspot-form-submit-button)

Next Article  →

[Add content that will only appear in the HubSpot editor](https://www.stephanieogaygarcia.com/hubspot-website-development/add-content-that-will-only-appear-in-the-hubspot-page-editor)

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

[ Tell me about your project ](https://www.stephanieogaygarcia.com/project-details)

##### Contact

Need help with a HubSpot CMS project? Get in touch!

[Email](mailto:stephanie@stephanieogaygarcia.com) | [Contact](https://www.stephanieogaygarcia.com/contact)

##### About

- [ About ](https://www.stephanieogaygarcia.com/about)
- [ Portfolio ](https://www.stephanieogaygarcia.com/portfolio-work)
- [ LinkedIn ](https://www.linkedin.com/in/stephanieogaygarcia/)
- [ Facebook ](https://www.facebook.com/stephanieogaygarcia)
- [ Instagram ](https://www.instagram.com/stephanieogaygarcia/)

##### Services

- [ HubSpot Website Development ](https://www.stephanieogaygarcia.com/services/hubspot-website-development)
- [ HubSpot CMS Technical Support ](https://www.stephanieogaygarcia.com/services/hubspot-cms-technical-support)
- [ Custom HubSpot CMS Themes ](https://www.stephanieogaygarcia.com/custom-hubspot-cms-hub-themes)
- [ Pricing ](https://www.stephanieogaygarcia.com/services#pricing)

##### Latest Articles

- [How to add an llms.txt page to your HubSpot website](https://www.stephanieogaygarcia.com/hubspot-website-development/add-an-llmstxt-page-to-your-hubspot-website)
- [Switch an existing HubSpot custom module from global to local](https://www.stephanieogaygarcia.com/hubspot-website-development/switch-an-existing-hubspot-custom-module-from-global-to-local)
- [Overriding HubSpot's new forms styling from theme settings](https://www.stephanieogaygarcia.com/hubspot-website-development/overriding-hubspots-new-forms-styling-from-theme-settings)
- [All Articles](https://www.stephanieogaygarcia.com/hubspot-website-development)

---

 Copyright © 2018 - 2026 Stephanie O'Gay Garcia. All Rights Reserved.   
Freelance HubSpot CMS Developer based in Toronto, Canada 🇨🇦   
[Terms of Service](https://www.stephanieogaygarcia.com/terms-of-service) | [Website Terms of Use](https://www.stephanieogaygarcia.com/website-terms-of-use) | [Privacy](https://www.stephanieogaygarcia.com/privacy-policy) | [Cookies](https://www.stephanieogaygarcia.com/cookie-policy) | [LLMs](https://www.stephanieogaygarcia.com/llms.txt)

Scroll to Top

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://www.stephanieogaygarcia.com/#person",
  "@type" : "Person",
  "description" : "Freelance HubSpot CMS Developer specializing in custom HubSpot website development, themes, templates, and bespoke modules for small–mid sized B2B and SaaS companies.",
  "image" : "https://www.stephanieogaygarcia.com/hubfs/Logos/stephanieogaygarcia_logo.svg",
  "jobTitle" : "Freelance HubSpot CMS Developer",
  "knowsAbout" : [ "HubSpot CMS", "HubSpot themes", "HubSpot templates", "HubSpot modules", "HubDB", "Website migrations to HubSpot CMS", "Figma to HubSpot implementation" ],
  "name" : "Stephanie O'Gay Garcia",
  "sameAs" : [ "https://www.linkedin.com/in/stephanieogaygarcia/", "https://www.facebook.com/stephanieogaygarcia", "https://www.instagram.com/stephanieogaygarcia/", "https://ecosystem.hubspot.com/marketplace/solutions/stephanie-ogay-garcia/" ],
  "url" : "https://www.stephanieogaygarcia.com/",
  "worksFor" : {
    "@id" : "https://www.stephanieogaygarcia.com/#organization"
  }
}
```

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://www.stephanieogaygarcia.com/#organization",
  "@type" : "Organization",
  "address" : {
    "@type" : "PostalAddress",
    "addressCountry" : "IE",
    "addressLocality" : "Dublin",
    "postalCode" : "A94"
  },
  "contactPoint" : {
    "@type" : "ContactPoint",
    "areaServed" : "Worldwide",
    "availableLanguage" : [ "en", "es" ],
    "contactType" : "sales",
    "email" : "stephanie@stephanieogaygarcia.com"
  },
  "description" : "Portfolio and business site of freelance HubSpot CMS Developer Stephanie O'Gay Garcia, based in Dublin, Ireland.",
  "logo" : "https://www.stephanieogaygarcia.com/hubfs/Logos/stephanieogaygarcia_logo.svg",
  "name" : "Stephanie O'Gay Garcia",
  "sameAs" : [ "https://www.linkedin.com/in/stephanieogaygarcia/", "https://www.facebook.com/stephanieogaygarcia", "https://www.instagram.com/stephanieogaygarcia/", "https://ecosystem.hubspot.com/marketplace/solutions/stephanie-ogay-garcia/" ],
  "url" : "https://www.stephanieogaygarcia.com/"
}
```

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://www.stephanieogaygarcia.com/#website",
  "@type" : "WebSite",
  "name" : "Stephanie O’Gay Garcia – Freelance HubSpot CMS Developer",
  "publisher" : {
    "@id" : "https://www.stephanieogaygarcia.com/#organization"
  },
  "url" : "https://www.stephanieogaygarcia.com/"
}
```

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Stephanie O'Gay Garcia",
    "url" : "https://www.stephanieogaygarcia.com/hubspot-website-development/author/stephanie-ogay-garcia"
  },
  "dateModified" : "2020-01-06T16:04:08.668Z",
  "datePublished" : "2019-12-13T15:41:44.000Z",
  "headline" : "Check if blog post comments are enabled on HubSpot using HubL",
  "mainEntityOfPage" : {
    "@id" : "https://www.stephanieogaygarcia.com/hubspot-website-development/check-if-blog-post-comments-are-enabled-on-hubspot-using-hubl",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://www.stephanieogaygarcia.com/hubfs/Logos/stephanieogaygarcia_logo.svg"
    }
  }
}
```