Internet Social Media

WordPress Share Buttons Without Plugins

You can add buttons for social networking sites to your site without using plugins. And that way you can get it done without overloading your server.

Because you know, I don’t know. Too many plugins can cause contractions and delays on your WordPress site.

Add the following code to .php single file of your theme, or you can add it to another appropriate section.

<div class="paylas">
<strong>Paylaş:</strong>
<!--Twitter-->
<a class="twitter" href="http://twitter.com/home?status=Reading: <?php the_permalink(); ?>" title="Share this post on Twitter!" target="_blank">Twitter</a>

<!--Facebook-->
<a class="facebook" href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&t=<?php the_title(); ?>" title="Share this post on Facebook!" onclick="window.open(this.href); return false;">Facebook</a>

<!--Whatsapp-->
<a class="whatsapp" href="whatsapp://send?text=<?php the_permalink();?>&t=<?php the_title(); ?>” data-action=”share/whatsapp/share">Whatsapp</a>

<!--Yazdır-->
<a class="yazdir" href="javascript:void(0);" onClick="window.print()" class="print">Print</a>
</div>

Add the following other code to the Additional CSS field from the Appearance>Customize section in the WordPress panel.

.paylas a{
display:inline-block;
margin:1px;
padding:5px;
color:#fff;
border-radius:3px;
-moz-border-radius:3px;
-o-border-radius:3px;
-webkit-border-radius:3px;
-ms-border-radius:3px;
font-size: 12px;
font-weight:bold;
text-align:center;
text-decoration:none;}

.twitter{background:#55acef;}
.facebook{background:#3B5998;}
.whatsapp{background:#00e676;}
.yazdir{background:#3399CC;}

Benzer Yazılar

Leave a Comment