Jump to content

Embedding a LInkedIn Badge

Recommended Posts

Hi Folx,

Having some trouble with a relatively simple process: Embedding a LinkedIn Badge into a dedicated page on our SS site. (The page is called LinkedIn on the top navigation bar.)

The code for embedding the Badge is simple enough to generate from your LI page. Here is ours. 

<script src="https://platform.linkedin.com/badges/js/profile.js" async defer type="text/javascript"></script>

<div class="badge-base LI-profile-badge" data-locale="en_US" data-size="large" data-theme="light" data-type="HORIZONTAL" data-vanity="cubela" data-version="v1"><a class="badge-base__link LI-simple-link" href="https://www.linkedin.com/in/cubela?trk=profile-badge">Rafael Cubela</a></div>

I embedded the HTML <div> by using the Page Builder>Edit>"+">Code block. Copy/paste/save; no issue. The hyper link behind the name "Rafeal Cublea"  that then appears on the screen then works fine.

The issue: The Badge itself will only appear if the <script> is placed in both in Settings>Advanced>Page Header Code Injection block and the Page Builder>Edit>"+">Code block. (In the latter, I changed the Mode to Javascript, pasted the Script, and saved.)  But here is the catch: the line of <script> code appears on the screen below the LI Badge. If either of the Script blocks are deleted, the Badge disappears.

Notes: When using Inspect Element tool, the Script, as placed only in the Settings>Advanced>Page Header Code Injection block, can be found at the bottom of the HTML, just before the </body> tag where I would expect it to be. 

Frustrating, but when I tried to reproduce the situation described above (after deleting all code) the LI Badge will no longer appear. 

Any ideas?

Thank you!

 

Link to comment
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

12 hours ago, SisselySevenRooT said:

Hi Folx,

Having some trouble with a relatively simple process: Embedding a LinkedIn Badge into a dedicated page on our SS site. (The page is called LinkedIn on the top navigation bar.)

The code for embedding the Badge is simple enough to generate from your LI page. Here is ours. 

<script src="https://platform.linkedin.com/badges/js/profile.js" async defer type="text/javascript"></script>

<div class="badge-base LI-profile-badge" data-locale="en_US" data-size="large" data-theme="light" data-type="HORIZONTAL" data-vanity="cubela" data-version="v1"><a class="badge-base__link LI-simple-link" href="https://www.linkedin.com/in/cubela?trk=profile-badge">Rafael Cubela</a></div>

I embedded the HTML <div> by using the Page Builder>Edit>"+">Code block. Copy/paste/save; no issue. The hyper link behind the name "Rafeal Cublea"  that then appears on the screen then works fine.

The issue: The Badge itself will only appear if the <script> is placed in both in Settings>Advanced>Page Header Code Injection block and the Page Builder>Edit>"+">Code block. (In the latter, I changed the Mode to Javascript, pasted the Script, and saved.)  But here is the catch: the line of <script> code appears on the screen below the LI Badge. If either of the Script blocks are deleted, the Badge disappears.

Notes: When using Inspect Element tool, the Script, as placed only in the Settings>Advanced>Page Header Code Injection block, can be found at the bottom of the HTML, just before the </body> tag where I would expect it to be. 

Frustrating, but when I tried to reproduce the situation described above (after deleting all code) the LI Badge will no longer appear. 

Any ideas?

Thank you!

 

Can you share your site with the protected password so I can take a look?

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword Highlighter
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
On 12/16/2022 at 3:03 AM, SisselySevenRooT said:

Hi BeyondSpace,

I appreciate the offer. How can I securely share that information?

Thanks Again!

Access password, not account password

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.