如何移除Google Blogspot(post-share-buttons)中的社交媒体分享按钮,仅保留功能链接?
Hey there! Let’s tackle this together. Looking at the code snippet you shared, I can pinpoint exactly which parts to modify to remove those social media share buttons while keeping your functional links intact.
Step 1: Locate the share button container
First, open your blog’s HTML file and search for the <div class="post-share"> block. This is where all the share-related elements are grouped. Here’s the relevant section from your code:
<div class="post-share"> <span>Share:</span> <ul class="social-icons"> <li><a href="#" class="facebook" title="Share on Facebook"><i class="fa fa-facebook"></i></a></li> <li><a href="#" class="twitter" title="Share on Twitter"><i class="fa fa-twitter"></i></a></li> <li><a href="#" class="pinterest" title="Pin on Pinterest"><i class="fa fa-pinterest"></i></a></li> <li><a href="#" class="linkedin" title="Share on LinkedIn"><i class="fa fa-linkedin"></i></a></li> <li><a href="#" class="email" title="Email this post"><i class="fa fa-envelope"></i></a></li> </ul> <a class="print-link" href="#" title="Print this post"><i class="fa fa-print"></i> Print</a> </div>
Step 2: Delete the social media buttons block
The entire <ul class="social-icons"> element (and all the <li> items inside it) is what contains the Facebook, Twitter, Pinterest, LinkedIn, and email share buttons. Delete this entire <ul> section—this will remove all social media share functionality.
Step 3: Keep your functional link
Leave the <a class="print-link"> element (the Print button) since that’s the functional link you want to retain. Your modified code will look like this:
<div class="post-share"> <span>Share:</span> <a class="print-link" href="#" title="Print this post"><i class="fa fa-print"></i> Print</a> </div>
Pro tip if you can’t find the code
If you’re struggling to locate this section in your HTML files, use your browser’s Developer Tools:
- Right-click on any social share button on your live blog.
- Select "Inspect" from the menu—this will highlight the exact HTML element in the DevTools panel.
- Note the class names (like
social-iconsorpost-share) and search for them in your HTML editor to jump straight to the right code.
内容的提问来源于stack exchange,提问作者Ellie

