• Tue. Oct 3rd, 2023

Cara Tambah Icon Social Media Sharing Button Di Entry Blog Post

Cara Tambah Icon Social Media Sharing Button Di Entry Blog Post

Untuk rakan blogger yang membuat blog baru samada menggunakan template blog blogspot yang mudah atau menggunakan template blog percuma dari mana-mana web, anda mungkin perasan bila ada antara template blog percuma yang anda dapat tidak mempunyai ‘social media button share’?Bagi blogger, butang ‘share’ untuk media sosial seperti Twitter, Facebook, Google+ dan Pinterest ini penting untung menaikkan trafik blog anda.

MrJocko baru sahaja tambah icon Social Media Sharing Button di blogpost Travelibur.com. Jom sama-sama kita belajar bagaimana untuk meletakkan kod html Icon Social Sharing Button Di Entry Blog Post. 

1. Go to Template > Edit HTML. 
2. Back up your template. 
3. Tick the Expand Widget Templates checkbox on top right of the code window. 
4. Next, locate the first instance of <data:post.body/> tag and paste the following code immediately above it: 

<!– Scripts Start –>

<b:if cond=’data:post.isFirstPost’>
<!– Facebook –>
<div id=’fb-root’/>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id))
js = d.createElement(s); js.id = id;
js.src =
fjs.parentNode.insertBefore(js, fjs);
}(document, &#39;script&#39;, &#39;facebook-jssdk&#39;));
<!– Google +1 –>
<script type=’text/javascript’>
(function() {
var po = document.createElement(&#39;script&#39;); po.type =
&#39;text/javascript&#39;; po.async = true;
po.src =
var s = document.getElementsByTagName(&#39;script&#39;)[0];
s.parentNode.insertBefore(po, s);
<!– Twitter –>
<!– Scripts End –>
<!– Horizontal social buttons Start –>
<div class=’horizontal-social-buttons’ style=’padding:10px 0
<!– Twitter –>
<div style=’float:left;’>
<a class=’twitter-share-button’ data-count=’horizontal’ data-lang=’en’
data-related=” data-via=” expr:data-text=’data:post.title’
expr:data-url=’data:post.url’ href=’https://twitter.com/share’>Tweet</a>
<!– Google +1 –>
<div style=’float:left;’>
<g:plusone annotation=’bubble’ expr:href=’data:post.url’
<!– Facebook Like+Send –>
<div style=’float:left;’>
<fb:like colorscheme=’light’ expr:href=’data:post.url’ font=”
layout=’button_count’ send=’true’
<!– Pinterest Start –>
<b:if cond=’data:blog.pageType == &quot;item&quot;’>
<div id=’pin-wrapper’ style=’float: left; margin:0px 0px 0px 30px;
<a data-pin-config=’beside’ data-pin-do=’buttonPin’
expr:href=’&quot;http://pinterest.com/pin/create/button/?url=&quot; +
<span style=’margin-left:-44px;’><a data-pin-config=’beside’
data-pin-do=’buttonBookmark’ href=’//pinterest.com/pin/create/button/’
<script src=’http://assets.pinterest.com/js/pinit.js’
<style type=’text/css’>
#pin-wrapper > a {background-image:none !important;}
<!– Pinterest End –>
<div style=’clear: both;’/>
<!– Horizontal social buttons End –>


Note: Pin It button will only appear on post pages. 

We place this limit  because the button only pins the page on which it appears. As such  on homepage (if we were to allow it there), every instance of the button will pin the homepage, not the post (as it’s “supposed” to). 

The Pinterest script in line 45 must occur only once in your blog. Omit this line if you’ve already had the script in your blog. 

5. Buttons positioning To position the buttons at the bottom of post, place the code below (instead of above) <data:post.body/>.  

6. Preview before saving. 


Travelibur Sebelum

Cara Tambah Icon Social Media


Travelibur Selepas


Cara Tambah Icon Social Media

By MrJocko

I'm Travel Blogger Malaysia. MrJocko is a multiple award-winning travel writer, tv host, photographer and social media influencer based in Kuala Lumpur, Malaysia. Been collaborating and writing for many tourisms and travel since 2000.

2 thoughts on “Cara Tambah Icon Social Media Sharing Button Di Entry Blog Post”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.