Add a Twitter button to your blog

If your theme does not include a Twitter button and you want to add one, then you will need to edit your theme. Contact the designer of your theme if you're not sure if your theme already includes a Twitter button – chances are, there is a theme setting to add Tweet buttons to your blog.

If your theme doesn't have that feature:

  1. Under the Templates folder, locate and click article.liquid and blog.liquid to open them in the online code editor.

  2. In blog.liquid and article.liquid — both templates will need to be edited in the same way - look for this code:

    {{ article.content }}

    Above the element that outputs the article content, paste the following code:

    <script src="" type="text/javascript"></script>
       <a href="" class="twitter-share-button"
          data-url="{{ shop.url }}{{ article.url }}"
          data-text="{{ article.title | escape }}"
  3. Replace your_screen_name with your Twitter account alias, without the @. For example, Shopify's twitter account name is shopify.

  4. Save your changes.

Repeat the above procedure for both templates.

Ready to start selling with Shopify?

Try it free