Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
WordPress Plugins
View all Guides

How to Add Official LinkedIn Share Button in WordPress

Last updated on by
Follow WPBeginner on YouTube
How to Add Official LinkedIn Share Button in WordPress

Just like Twitter Retweet Button, Facebook Like Button, and Facebook Share Button, Business-oriented social network LinkedIn has launched their own share button, which gives publishers a way to spread their content on LinkedIn and enables users to easily share content with their LinkedIn network. In this article, we will show you how you can quickly add the LinkedIn Share Button in WordPress.

LinkedIn Share Button

To add the Official Linkedin Share button simply open up a theme file of your choice (single.php etc) and add the following code within the Post Loop:

Vertical Count

Vertical count display will show the count on top of the button as displayed in the preview image.

<script type="text/javascript" src=""></script><script type="in/share" data-url="<?php the_permalink(); ?>" data-counter="top"></script>

Horizontal Count

Horizontal count will display the count to the right of the button, which can be seen in the image preview above.

<script type="text/javascript" src=""></script><script type="in/share" data-url="<?php the_permalink(); ?>" data-counter="right"></script>

No Count

<script type="text/javascript" src=""></script><script type="in/share" data-url="<?php the_permalink(); ?>"></script>

Because this was announced recently, there are no plugins for this yet. But we are certain that developers will be releasing them soon. If you are a developer who have a plugin in works, then please keep us updated, so we can add it in this post.

Additional Resources

Official Page for Publishers

Editorial Staff at WPBeginner is a team of WordPress lovers led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »
  • sinhrakesh

    I used below codes in the Custom Codes section to add Google+ and Linkedin Share buttons on my WP Blog (


    <div class=”sharer”><script type=”text/javascript” src=””></script> <g:plusone size=”tall”></g:plusone></div>


    <div class=”sharer”><script type=”text/javascript” src=””></script><script type=”in/share” data-url=”<?php the_permalink(); ?>” data-counter=”top”></script></div>

    Google+ Button is working fine but Linkedin Share isn’t getting the desired result upon clicking… Can you please advise whats wrong where?

  • wpbeginner

    @ThomasRand-Nash No you cannot.

  • ThomasRand-Nash

    can you change the sizing of the like button?

  • Crysislevel

    buttons tutorials are my fav. unfortunately i dont use linkedin that much! :(

  • wpbeginner

    @SJCParis No you cannot use this on free sites…

  • SJCParis

    Can I put this button on a free wordpress blog?

  • wpbeginner

    You are welcome. Yes horizontal one works great, but if you have a floating share box like ours, then the vertical share box is good too.

  • Kavita

    Thanks for the code. I like the horizontal with count ideal for my blog.

  • Jeremy Victor

    can you tell me how to add this LinkedIn share button to your Smart Sharing plugin?


    • Editorial Staff

      Copy and paste the LinkedIn script code that we share in this article in the custom code section…

      • Holly

        Thanks for this. I pasted the code in the custom code section, but it’s not working…says “there’s a problem performing this action.” Any help would be greatly appreciated.

        • Editorial Staff

          Which custom code section?

  • Keith Aul

    I’m not to sure what you mean by the following?
    To add the Official Linkedin Share button simply open up a theme file of your choice (single.php etc) and add the following code within the Post Loop

    I don’t want to break anything on my site so I want to be sure I’m able to find the right file and open/edit it. Where would I find the theme file in my dashboard and where in the file do I post the code?

    • Editorial Staff

      You will find the theme file in your theme’s folder wp-content/themes/yourthemename/ < Editor and edit single.php file. If you have no knowledge regarding WordPress, then we recommend that you wait till a plugin comes out.

  • brad dalton

    How long do you think it will take to build a plugin?

    • Editorial Staff

      Plugins are probably built and are in the review process to get live in the repository.

  • Dana

    Thanks, great article! Where’s your share button? ;)

    • Editorial Staff

      We will be adding it soon on the site :)

  • Piet

    Finally LinkedIn did this, a week too late though, but I managed to make something similar for myself.
    Next time I need it, I will just grab your code, thanks!

  • Eleanor

    I am not a developer, but I found this plugin a few minutes ago. Thank you for the tutorial!

    • Editorial Staff

      This plugin does not have the count option available.

    • Jose Joel

      The Share This Plugin have the option to add the LinkedIn Button as simple as writing linkedin the editing section of the plugin…and this one have count… ;)

      Note: I’m not the developer of this plugin, neither work for them, I’m only a regular user… :)

  • Jon Bishop

    I’m happy LinkedIn finally did this. I tried to use their API to make my own for the Socialize plugin but it ended up being a pain. I was able to finally use this code to update the plugin with the new LinkedIn button.