I tried to put my public Linkedin profile in the “About” section of my blog. After reading various tutorials, I realized that none were made for statically displaying a specific profile. Here is a simple solution, a small piece of code that you can directly put in your WordPress page or post editor.
1 – Get a Linkedin API key
First, get an Linkedin API key. You can find out how to do that in the chapter 2 of this page.
2 – Retrieve the Data ID
Each Linkedin profile is identified by various ID. The one that interested us now is the Data ID. I wrote a small code to help you getting it. Be sure you are signed in Linkedin and just push the button !
3 – Use this code
If you want to use this code on your WordPress blog, you can directly copy/paste in in the text editor of your post or page. Be sure to edit in “Text” and not in “Visual” (more info). If you are a developer and need it for your website, the proper way should be to but the Linkedin API loader in the header of your page and the rest in the body.
<!-- Load the Linkedin API -->
api_key: <!-- Replace this comment by your API key -->
<!-- The profile container -->
<script type="IN/FullMemberProfile" data-id="RGZXJPi2Rb"></script>
<!-- Replace "RGZXJPi2Rb" by the Data ID of the profile you want to display -->
If the visitor is connected to his/her Linkedin account, this code works perfectly fine. But if the visitor is not logged in, it will display very few information on your the Linkedin profile and show a button to connect in Linkedin. I guess this is a choice of Linkedin, to attract more people.
You can try to see the difference by connecting/disconnecting from your Linkedin profile and refresh this page: when you are connected, the profile is fully displayed, when you are not connected, it will only display the basic information and show you a button to connect.
Personally, I don’t like this feature, so I choose to use a plugin instead of coding myself (WP Linkedin) but the simple code described above may be useful for other uses.