Content Strategy & SEO

LDewit
Participant

Possible to add schema markup to a specific blog author's bio page?

SOLVE

We would like to add a personalized schema markup to only one of our blog author bio pages - is that possible? I know that the blog author listing page doesn't have its own template, and it's part of the blog listing template, so not sure if there is a way to do this. Is there a way to add the schema to the <head> section for only one particular blog author bio?

0 Upvotes
2 Accepted solutions
ArisudanTiwari
Solution
Guide | Gold Partner
Guide | Gold Partner

Possible to add schema markup to a specific blog author's bio page?

SOLVE

Hi @LDewit ,

 

HubSpot doesn’t natively support adding custom code to the <head> section of individual author bio pages (e.g., /blog/author/author-name). These pages are dynamically generated and don’t have their own editable templates. While HubSpot allows adding custom head HTML for blog posts, it doesn’t offer this option for author pages.
https://knowledge.hubspot.com/blog/create-and-manage-your-blog-authors

Based on AI suggestions, there are a couple of workarounds you can try using HubL conditional logic in the main blog listing template, which is typically inherited by author pages.

Option 1: Conditional Schema Markup Based on Author

You can add schema markup in the <head> section of your blog listing template and wrap it with an if condition based on the author slug:

 

{% if content.author.slug == "john-doe" %}
  <script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "Person",
    "name": "John Doe",
    "jobTitle": "Content Strategist",
    "url": "{{ request.full_url }}",
    "sameAs": [
      "https://www.linkedin.com/in/johndoe/",
      "https://twitter.com/johndoe"
    ]
  }
  </script>
{% endif %}

 

Add this code to the <head> section of your blog-listing.html or blog.html file in the Design Manager.

Option 2: HubDB for Multiple Authors

If you want to manage schema for several authors:

  1. Create a HubDB table with columns for slug and schema_markup.

  2. In your blog template, use:

{% set author_schema = hubdb_table_rows(table_id, "slug=" + content.blog_post_author.slug) %}
{% if author_schema %}
  <script type="application/ld+json">
    {{ author_schema[0].schema_markup }}
  </script>
{% endif %}

This keeps things cleaner if you’re managing multiple author profiles with unique schema.

Let me know if this works for you. If not, I’ll tag a few HubSpot developer experts here who may have more ideas.

Hope this helps!

If my reply answered your question, please mark it as a solution to make it easier for others to find.


Cheers!

Arisudan Tiwari
HubSpot Advisor



Grazitti

View solution in original post

ArisudanTiwari
Solution
Guide | Gold Partner
Guide | Gold Partner

Possible to add schema markup to a specific blog author's bio page?

SOLVE

Hi @LDewit ,

No, the "Header HTML" section in HubSpot blog settings is not dynamic and doesn’t support HubL logic (like if statements). You need to place this code inside your blog listing template file in Design Manager, specifically in the <head> section.

  • Navigate to Marketing > Files and Templates > Design Tools

  • Open your blog listing template (typically named blog-listing.html or similar)

  • Add the conditional schema code within the <head> block

If my reply answered your question, please mark it as a solution to make it easier for others to find.


Cheers!

Arisudan Tiwari
HubSpot Advisor



Grazitti

View solution in original post

4 Replies 4
ArisudanTiwari
Solution
Guide | Gold Partner
Guide | Gold Partner

Possible to add schema markup to a specific blog author's bio page?

SOLVE

Hi @LDewit ,

 

HubSpot doesn’t natively support adding custom code to the <head> section of individual author bio pages (e.g., /blog/author/author-name). These pages are dynamically generated and don’t have their own editable templates. While HubSpot allows adding custom head HTML for blog posts, it doesn’t offer this option for author pages.
https://knowledge.hubspot.com/blog/create-and-manage-your-blog-authors

Based on AI suggestions, there are a couple of workarounds you can try using HubL conditional logic in the main blog listing template, which is typically inherited by author pages.

Option 1: Conditional Schema Markup Based on Author

You can add schema markup in the <head> section of your blog listing template and wrap it with an if condition based on the author slug:

 

{% if content.author.slug == "john-doe" %}
  <script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "Person",
    "name": "John Doe",
    "jobTitle": "Content Strategist",
    "url": "{{ request.full_url }}",
    "sameAs": [
      "https://www.linkedin.com/in/johndoe/",
      "https://twitter.com/johndoe"
    ]
  }
  </script>
{% endif %}

 

Add this code to the <head> section of your blog-listing.html or blog.html file in the Design Manager.

Option 2: HubDB for Multiple Authors

If you want to manage schema for several authors:

  1. Create a HubDB table with columns for slug and schema_markup.

  2. In your blog template, use:

{% set author_schema = hubdb_table_rows(table_id, "slug=" + content.blog_post_author.slug) %}
{% if author_schema %}
  <script type="application/ld+json">
    {{ author_schema[0].schema_markup }}
  </script>
{% endif %}

This keeps things cleaner if you’re managing multiple author profiles with unique schema.

Let me know if this works for you. If not, I’ll tag a few HubSpot developer experts here who may have more ideas.

Hope this helps!

If my reply answered your question, please mark it as a solution to make it easier for others to find.


Cheers!

Arisudan Tiwari
HubSpot Advisor



Grazitti

LDewit
Participant

Possible to add schema markup to a specific blog author's bio page?

SOLVE

Thank you for your help here - would I add it to the "Header HTML" section in the blog template in Hubspot settings (vs in the Design Manager)? And going with option 1, wouldn't the author variable be: content.blog_post_author.slug?

ArisudanTiwari
Solution
Guide | Gold Partner
Guide | Gold Partner

Possible to add schema markup to a specific blog author's bio page?

SOLVE

Hi @LDewit ,

No, the "Header HTML" section in HubSpot blog settings is not dynamic and doesn’t support HubL logic (like if statements). You need to place this code inside your blog listing template file in Design Manager, specifically in the <head> section.

  • Navigate to Marketing > Files and Templates > Design Tools

  • Open your blog listing template (typically named blog-listing.html or similar)

  • Add the conditional schema code within the <head> block

If my reply answered your question, please mark it as a solution to make it easier for others to find.


Cheers!

Arisudan Tiwari
HubSpot Advisor



Grazitti

LDewit
Participant

Possible to add schema markup to a specific blog author's bio page?

SOLVE

Hi @ArisudanTiwari,

 

I got this to work with your help, thank you! Option 1 worked using the conditional based on author, but wasn't working with the content.blog_post_author variable .slug property for some reason. This property worked:  {% if blog_author.display_name == "John Doe" %}

 

Thank you again!