How To Put Cool Facebook And Twitter Share Button On Thesis Theme

Thesis Theme is a simple and powerful theme (framework) where everyone can customize it easily although they are zero knowledge in coding like me. I just made some changes into the coding according to the thesis theme. And its works.

To make a facebook and twitter share button just like above, first you need to insert this code on custom_functions.php. You can change the hooks based on your requirements. In this coding I used thesis_hook_before_post.

/* fb n twit*/
function share_button(){
 if (is_single( )) { ?>

<!-- Facebook Like Button -->

<!-- Facebook Like Button -->

<!-- Twitter Share Button --></pre>
<div class="tweet"><a class="twitter-share-button" href="">Tweet</a>

<script type="text/javascript" src="">// <![CDATA[
// ]]></script></div>
<!-- Twitter Share Button -->

<!--?php }}<br /-->add_action('thesis_hook_before_post','share_button');

Then insert this (below) coding in custom.css to give it style. You can change the colour (box) if you want.

 /*Twit n fb*/
.fblike {
    background: #E6F1FA;
    border: 1px solid #ACD6FA;
    border-radius: 4px;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    margin: 10px 0px;
    padding: 13px 12px 14px 10px;
    width: 195px;
    float: right;

.fblike {
    background: #ECEEF5;
    border: 1px solid #9DACCE;
    padding: 12px 15px 0px;
    width: 340px;
    float: left;

If you have any problems or idea, please feel free to drop a comment below.