How to Add Google Plus Authorship to a Shopify Site
Adding Google authorship to content is now an important step for many sites and content creators. Enabling your content to display its author gives your listings in the search engine results a potential increased CTR of over 20%.
Including it on your site is relatively straight forward and platforms such as WordPress make the process even easier with the brilliant SEO Yoast plugin. However, we found that adding G+ authorship to a Shopify site was slightly more difficult.
We searched high and low on the Shopify forums for an answer and although its incredibly useful resource we couldn’t find a straight forward way of achieving our goal.
Our aim was to add an author to every page of the site – all except product pages. So to do that we created a tiny bit of code that would allow us to do that. Here’s how.
To include Google Plus Authorship on your content pages of your Shopify site:
- Navigate to your Shopify dashboard
- Click themes > template editor
- Select ‘theme.liquid ‘ – This is the main template file and applies to all pages, including product pages, on your site.
- Include the code below:You can copy and paste the code from here:
{% if template != ‘product’ %} <a href=”[profile_url]?rel=author”>Google</a> {% endif %}
Here it is in action:
A product page without G+ authorship:
A normal page with G+ authorship:
But you’re not done yet! The final step is to link your Google plus account with your website. For a comprehensive guide on how to do this check out Googles authorship guide.
Related reading…
How To Remove Pages From Google in 12 Hours
At Orchid Box we have gained a lot of experience in understanding the methods used by Google, especially how it caches and indexes websites. Sometimes clients’ website have urls they don\'t want to be exposed, searchable or even visible to the...
read moreHow to Enable Mod_Rewrite Module in Apache in XAMPP, WAMP?
This is just a quick tutorial on how to enable how to mod_rewrite module in apache installed under windows environment. 1) Find the “httpsd.conf” file under the “conf” folder inside the Apache’s installation folder. 2) Find the following line...
read moreJavaScript Function To Generate URLs Without Any Rubbish Characters
Have you ever wanted to generate perfect URL from blog post or any page title? We couldn't find any free function available, for this reason our Sergey built a collection of amazing JS functions for Orchid box CMS. We have decided to release it to...
read more