Change the author name and URL in Shopify without giving staff access
Google wants to show pages in search results that answer the questions customers are asking. To do that, they need quality content created by those with expertise on the topic.
If you're not already using experts for your blogs, I encourage you to do so. It's a great way to boost your Shopify store's expertise.
Make sure you also share the author's name as a by-line of the blog posts. This helps Google to see the content is from an expert on the topic and give credit to the author.
Unfortunately, Shopify doesn't make it easy to use the author's name unless you make them a staff user. You shouldn't need to give them access to your store just to publish an article they wrote.
To make matters worse, there are two different places you'll want to update the author's name.
- In the structured data
- Visually on the page
Here's how to change the author's name with JSON-LD for SEO without granting staff access to your Shopify store. Heads up, it does involve some code if you want to visually show the author's name.
In the structured data
By default, JSON-LD for SEO will use the author name in Shopify. We can also use a specific metafield to create a custom author name in the structured data.
If your change is sitewide, you can easily update the author's name, URL and type directly in JSON-LD for SEO. This override will reflect on every Article structured data across the site.
For more control on at the page level, using metafields is recommended.
Create a metafield
Use Shopify’s Metafields or your metafield tool of choice and add the author name for Blog Posts data.
Go to Settings -> Custom Data -> Blog Posts -> Add definition
- namespace:
jsonld
- key:
author
- type:
string or single line
You can also set the author URL with JSON-LD for SEO. Though this is rarely used visually, Google does use the author URL for structured data.
You can set the author URL site wide in the app or use the metafield below to set the author URL per page.
- namespace:
jsonld
- key:
author_url
- type:
string or single line
You can also set the author type using a metafield per page. By default, we use Person but you can change it to Organization if you prefer.
- namespace:
jsonld
- key:
author_type
- type:
string or single line
Only use Person or Organization to comply with Google's specs.
Assign the value of the metafield to your blog posts
Now you'll want to add the author name or author URL to the blog posts.
Go to the blog posts in your Shopify admin. Scroll to the very bottom of the page and you should see the Metafield section. Select Show all to see the metafield you created.
Add the author name and/or URL for that specific blog post.
SELECT SAVE
Once you hit save, JSON-LD for SEO will automatically use your custom author name and author URL in the structured data.
Don’t forget to test the page after you’ve created the author structured data. Your result should look similar to the example from my demo site below.
Visually on the page
This is where things may get uncomfortable if you're unsure how to edit code. If you need help with this, I recommend you contact your theme or a Shopify Developer. I cannot help with theme edits beyond this article.
Before editing your code, always back up your theme just in case!
You'll need to locate the code for the author's name in your theme files. There may be a few spots to update depending on where your theme allows you to visually show the author's name.
You're looking for something similar to {{ article.author }}
As an example for Shopify's Dawn theme, you'll find the code in the article-card.liquid
and main-article.liquid
files.
Once located, change the code to use the metafield you created.
Old code: {{ article.author }}
New code: {{ article.metafields.jsonld.author.value }}
Select SAVE and view your page. Shopify does cache so if you notice it taking a few minutes, that's normal.
Using guest posts for your Shopify store is a great way to get new and fresh perspectives on your Shopify blog.
Just remember to give your authors credit and to update the author details in the structured data using JSON-LD for SEO.
JSON-LD for SEO
Get more organic search traffic from Google without having to fight for better rankings by utilizing search enhancements called Rich Results.