Add the LinkedIn share button to all blog posts
On all blog posts under the articles I need a LinkedIn share button. I'm using the turbo Portland theme the "show social media share icons" is on but LinkedIn is not part of it. How do I custom code this in?
-
Open /snippets/social-buttons.liquid
Add your Linkedin code below the other social media icons like so
-- CODE --
<div class="share-btn linkedin"><!--linkedin-->
<a target="_blank" class="icon-linkedin-share" href="http://www.linkedin.com/shareArticle?mini=true&url=http://{{ shop.domain }}{{ article.url }}&title={{ article.title }}&summary={{ article.content | strip_html | truncate: 240 }}&source=http://{{ shop.domain }}{{ article.url }}"></a>
</div>-- STYLES --
Search your style sheet for -share:before and just copy the styles from another icon to the new element.class e.g. .icon-linkedin-share:hover and .icon-linkedin-share:hover:before
You might need to also add the icon in to the styles. Note that "\eaca" might be another icon (this happened to me) so you just need to find what code linkedin is.
.icon-linkedin-share:before { content: "\eaca"; }
Hope that helps
Please sign in to leave a comment.
Comments
4 comments