Last active
December 31, 2015 02:29
-
-
Save techjewel/7921271 to your computer and use it in GitHub Desktop.
This is a very simple code snippet to add social button as sortcode in wordpress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// paste this section in your functions.php | |
function j_add_this_social() { | |
return '<div class="addthis_toolbox addthis_default_style "> | |
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a> | |
<a class="addthis_button_tweet"></a> | |
<a class="addthis_button_pinterest_pinit" pi:pinit:layout="horizontal"></a> | |
<a class="addthis_counter addthis_pill_style"></a> | |
</div> | |
<script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script> | |
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4e6ddb0b0891cd1c"></script>'; | |
} | |
add_shortcode('j_add_this_social', 'j_add_this_social'); | |
//end addthis section | |
// use this sortcode in your page/post/sidebar | |
// [j_add_this_social] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment