Wednesday, July 13, 2011

Pasang Tombol Facebook Like di Setiap Artikel Blog

Sobat Suka sayapun Suka. Mau taruh tombol suka di Blog / Wordpress atau di sidebar mudah dan gampang silahkan copas kode dibawa ini



1. Pasang di template Blogspot/Blogger

Silahkan login, masuk ke Layout, lalu klik Edit Template, centang pilihan Expand Widget Templates. Cari kode <data:post.body/> di template anda, lalu di atas/di bawahnya pasang kode ini:

<iframe src="http://www.facebook.com/plugins/like.php?href=<?php the_permalink() ?>&amp;action=like&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;font=arial&amp;colorscheme=light" allowTransparency="true" frameborder="0" scrolling="no" style="border:none; overflow:hidden; width:450px; height:25px;"></iframe>


2. Pasang di template WordPress.ORG (self hosted)

Silahkan login, masuk ke Appearance, lalu klik Editor (Themes editor). Silahkan buka template Single Post (single.php) atau Page Template (page.php). Carilah kode <?php the_content(); ?>, lalu di atas/di bawahnya tambahkan kode ini:



<iframe src="http://www.facebook.com/plugins/like.php?href=<?php the_permalink() ?>&amp;action=like&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;font=arial&amp;colorscheme=light" allowTransparency="true" frameborder="0" scrolling="no" style="border:none; overflow:hidden; width:450px; height:25px;"></iframe>




3. Pasang di Sidebar/Widget/Webpage (javascript)

<script type="text/javascript">
document.write('<iframe src="http://www.facebook.com/plugins/like.php?href=' + escape(location.href) + '&amp;action=like&amp;layout=standard&amp;show_faces=true&amp;width=100%&amp;font=arial&amp;colorscheme=light" allowTransparency="true" frameborder="0" scrolling="no" style="border:none; overflow:hidden; width:100%; height:25px;"></iframe>');
</script>

 

Selamat ber suka-suka

No comments:

Post a Comment