Jump to content

Social Share Buttons on Blog Post Pages

Recommended Posts

Site URL: https://www.kwinmosby.com/blog/coronavirus-effect-impact-on-travelers-of-color

I have a blog on my personal website and would like to add a social share bar to each blog post. Has anyone used customized code that has worked really well with Squarespace? I would like to allow readers/users the ability to share a blog post on social platforms such as Facebook, Twitter, LinkedIn, etc. Any help would be greatly appreciated. I've added an example of one of my blog posts that I would like to add a social share bar.

Link to comment
  • Replies 4
  • Views 1.6k
  • Created
  • Last Reply
  • 2 months later...

Here you go everyone.  This is a free work around to get your share buttons on all of your blog posts within Squarespace 7.1  below your Blog h1 Title:
1. Sign-up with sharethis.com
2. Copy the sharethis.com code snippet and paste it within the Blog Header Injection.
3.  Also add this code snippet to the Blog Header Injection:

<script src="https://code.jquery.com/jquery-3.5.0.js"></script>

<script> 
  $(document).ready(function() {
  $('<div class="sharethis-inline-share-buttons"></div>').appendTo('.blog-item-title');
});
</script>

4. Add a little CSS:

#st-1
{margin-top:20px;}


-----------
You can play around with other CSS styling:

.blog-item-wrapper .blog-item-title h1.entry-title
{max-width: 750px;}

@media screen and (min-width: 1150px) {
#st-1
{width: 27%;
float:right;
margin-top:-7%;}
}

@media screen and (max-width: 1149px) {
#st-1
{margin-top:20px;}
}


 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.