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
  • Views 1.7k
  • 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?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 No-code customisations for Squarespace (+100 Spark plugin customisations)
🚀 Learn how to rank new pages on Google in 48 hours!

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

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.