Add LinkedIn Share button to Website / Blog
Share buttons and badges are one of the important parts of blogs and websites which allow readers to share and spread the content on web with ease. We’ve already discussed about putting Facebook Share button, Twitter, Digg, Pinterest Pin It button on your website. Now, it’s the time to put an In Share i.e. LinkedIn share button on your website or blogs.
Do you know that LinkedIn can help you a lot to generate traffic for your blogs and websites?
Read this article at Problogger.net for some basics to drive traffic from LinkedIn.
Eventually, by adding a LinkedIn share badge to your blog or website, you allow your visitors to share your postings directly to their LinkedIn accounts.
Add LinkedIn Share button to Website / Blog
To add LinkedIn share button to website or blog, point your browser to LinkedIn Publishers’ Page, grab the button code and paste it in your blog template where you want to make it appear.
You may also use the text-box asking for the URL to be shared which is completely optional. This option is useful when you want a only particular URL (eg. your blog or website URL) to be shared, not the posts or pages on which the button appear. Do not enter any URL, if you are going to put the button with your blog posts.
LinkedIn Share Button code
Below code is valid for all websites regardless of what platform they use. You just need to put this code in your site’s HTML, then save it and see the LinkedIn Share button working.
<script type="text/javascript" src="http://platform.linkedin.com/in.js"></script><script type="in/share" data-counter="right"></script>
You may modify data-counter value to top (for vertical counter), right (for right aligned counter) and none (for no counter).
Recommended for Advance users
If you want a more advance In share button, for example, making it appear on the index page of your posts (home page in most cases, carrying the list of posts), the code from LinkedIn Publishers’ Page will not work for this. The code is required to be modified a bit. Use the below code and modify it as explained below:
<script type="text/javascript" src="http://platform.linkedin.com/in.js"></script><script type="in/share" data-url="PERMALINK" data-counter="right"></script>
- For WordPress users: Put <?php the_permalink(); > in place of PERMALINK.
- For Blogger.com users: Replace data-url with expr:data-url and put <data:post.url /> in place of PERMALINK.
- For Tumblr users: Put {Permalink} in place of PERMALINK.