Do you want to add the official LinkedIn share button in WordPress? There are many social media plugins that let you add share buttons, but most of them donβt use the official buttons. In this article, we will show you how to add the official LinkedIn share button in WordPress.
Adding Official LinkedIn Share Button in WordPress
For this tutorial youβll need to edit your WordPress theme files. If you havenβt done this before, then check out our guide on how to copy and paste code in WordPress.
First, you need to visit the LinkedIn Share Plugin page. You will be asked to select your websiteβs language and the button style you want to use.
You can leave the URL field blank because the share button can automatically get the page URL.
Next, you need to click on the βGet Codeβ button to copy your LinkedIn share button code.
Now that we got the share code, letβs add the official buttons in your WordPress site.
Display LinkedIn Share Button in WordPress Posts and Pages
If you want to display the LinkedIn share button before your post content, then you can use the following code. You will need to copy and paste this code into your themeβs functions.php file or in a site-specific plugin.
You can save your changes and visit your website to see it in action.
If you want to display the share button after your postβs content, then you will need to add the following code instead.
You can also add the LinkedIn share button code you copied earlier directly into a WordPress custom HTML widget. Simply 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 store your changes.
You can now visit your website to see it in action.
We hope this article helped you learn how to easily add the official LinkedIn share button in WordPress. You may also want to see our list of the best LinkedIn plugins for WordPress.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.