How to Add a LinkedIn Share Button in WordPress

How to Add a LinkedIn Share Button in WordPress

LinkedIn is one of the most famous networks which coordinates with Twitter, Facebook, Google+ and Pinterest. It is especially designed for business professionals who determine to take advantage of social networks to increase their business and drive target readers back. In this article we will share how to add a LinkedIn Share Button in WordPress.

About LinkedIn

LinkedIn is a famous company that gives service for educated business client for social cooperation. Millions of businessmen and webmasters select this company to set up their connections, enhance their horizon and explore solutions from the connections. This company assign itself to provide effective, safe, and valuable social service.

Reasons for Choosing LinkedIn

It has many functions, lots of which are preferable to those provided by other websites. After adding the shared button, all of them become accessible. Main functions of LinkedIn:-

  • Public and it manages your professional information
  • Create and look for opportunity for project including information collecting and file sharing
  • It release working experience and setup connection with corporations and personnel
  • Search working opportunity and working advice.

Adding Official LinkedIn Share Button in WordPress

For this you have to edit your WordPress theme files.

  • First visit the LinkedIn Share Plugin page. From here select your website’s language and the button style you want to use.
  • You can leave the URL field blank.
  • Next click on the ‘Get Code’ button to copy your LinkedIn share button code.

Display LinkedIn Share Button in Posts and Pages on WordPress

For displaying the LinkedIn share button in Posts and Pages on WordPress use the code. Just copy and paste this code into your theme’s functions.php file or in a site-specific plugin.

function wpb_linkedin_share_before($content) {

// Share code you copied from LinkedIn

$sharecode .= ‘<script src=”//platform.linkedin.com/in.js” type=”text/javascript”> lang: en_US</script>

<script type=”IN/Share” data-counter=”top”></script>’;

$newcontent = $sharecode .$content;

return $newcontent;

}

add_filter(‘the_content’, ‘wpb_linkedin_share_before’);

Save your changes and visit your website to see it in action. For showing the share button after your post’s content add code alternatively.

function wpb_linkedin_share_after($content) {

$sharecode .= ‘<script src=”//platform.linkedin.com/in.js” type=”text/javascript”> lang: en_US</script>

<script type=”IN/Share” data-counter=”top”></script>’;

$newcontent = $content . $sharecode;

return $newcontent;

}

add_filter(‘the_content’, ‘wpb_linkedin_share_after’);

You can add the LinkedIn share button code directly into a WordPress custom HTML widget. For this visit Appearance » Widgets page and add the ‘Custom HTML’ widget to a sidebar.

Next, add your LinkedIn Share button code inside the custom HTML widget and click on the save button to save your changes. Visit your website to see it’s action.

FINAL THOUGHTS

We hope that the above article helped you in adding a LinkedIn share Button in WordPress. You can easily add it by reading the above article carefully.

Still unable to add LinkedIn share Button in WordPress, contact to our WordPress Customer Service Team. Dial + 1 844 897 0441(Toll-Free). We will be pleased to help you.

Read More:



Leave a Reply