Replace Facebook with LinkedIn share on posts

Hey, so I wanted to get rid of the FB share and replace it with LinkedIn. I did a little trial and error and some forum, google and github searching. I thought I’d put the solution here to save anyone else that time.

On the theme, in Visual Studio Code I did a find and search on facebook and replaced it with linkedin.

Then replaced Facebook line of html in the post_share.hbs with:

<a class="linkedin" href="https://www.linkedin.com/shareArticle?mini=true&amp;title={{encode title}}&amp;url={{url absolute="true"}}" onclick="window.open(this.href, 'linkedin-share','width=580,height=296');return false;">
  {{>icons/social/linkedin}}
</a>

hmm for some reason the closing bracket doesn’t render in this message. add the closing bracket for the a to :point_up:

I hope this helps!

2 Likes