Learn Thesis Theme Fast to Build Unique and Beautiful Websites

  • Thesis Designer Guide is the fastest way to learn the Thesis framework.
  • A step-by-step guide walks you through all the essential things you need to know to become a Thesis design expert.
  • You don’t need to be a programmer to learn Thesis design.
  • The complete Thesis Designer Guide covers all the coding basics and tools needed to become a Thesis expert.

Learn Thesis Theme! Get Started Now!

How to Add Social Bookmark Button Links inside Posts in Thesis

by in How To,Thesis Theme Customization

In this video tutorial deals about how to add social book marking buttons inside your post page. Social book marking icons are very important for blogging and we need these buttons at the end of the post then only if a visitor read your article they can able to share your article with their friends easily. So you can add your book marking icons at the end of the post.

  1. Create or download book marking icons like digg, delicious, youtube, twitter, facebook, stumble upon and what ever you need.
  2. Save those icons as a image format like png, jpeg, tif and etc.
  3. Upload all images into thesis theme using ftp software like filezilla or fireftp.
  4. Login your ftp using cpanal username and password.
  5. Select the folder you need to upload images for this go click the following path. Publicl_html/fourblogger.com/wp-content/themes/thesis_16/custom/images. Inside the image folder you need to upload bookmark icons.
  6. Then select images in your desktop via ftp and upload by double clicking.

Once you uploaded your image copy and paste the following code in cuctom_function.php or launch.php file.

/* Adds socil media  bookmark links after each post */

add_action('thesis_hook_after_post_box', 'share_post');

function get_tiny_url($url) {
if (function_exists('curl_init')) {
$url = 'http://tinyurl.com/api-create.php?url=' . $url;
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
$tinyurl = curl_exec($ch);
curl_close($ch);
return $tinyurl;
}
else {
// cURL disabled on server; Can't shorten URL
// Return long URL instead.
return $url;
}}
function share_post () {
if (is_single()) {
?>
<div class="box"><div class="share">
<h3>Share with your friends!</h3>
</div>
<div class="social_icons">
<p>
<a href="http://www.youtube.com/sharer.php?u=<?php the_permalink();?>&amp;amp;t=<?php the_title(); ?>" title="Share on youtube.">
<img src="<?php bloginfo('template_directory'); ?>/custom/images/youtube.png" alt="Share on youtube" id="sharethis-last" />
</a>
<a href="http://www.stumbleupon.com/submit?url=<?php the_permalink(); ?>&amp;amp;title=<?php the_title(); ?>" title="StumbleUpon.">
<img src="<?php bloginfo('template_directory'); ?>/custom/images/stumbleupon.png" alt="StumbleUpon" />
</a>
<a href="http://www.reddit.com/submit?url=<?php the_permalink(); ?>&amp;amp;title=<?php the_title(); ?>" title="Vote on Reddit.">
<img src="<?php bloginfo('template_directory'); ?>/custom/images/reddit.png" alt="Reddit" />
</a>
<a href="http://digg.com/submit?phase=2&amp;amp;url=<?php the_permalink(); ?>&amp;amp;title=<?php the_title(); ?>" title="Digg this!">
<img src="<?php bloginfo('template_directory'); ?>/custom/images/digg.png" alt="Digg This!" />
</a>
<a href="http://del.icio.us/post?url=<?php the_permalink(); ?>&amp;amp;title=<?php the_title(); ?>" title="Bookmark on Delicious.">
<img src="<?php bloginfo('template_directory'); ?>/custom/images/delicious.png" alt="Bookmark on Delicious" />
</a>
<a href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&amp;amp;t=<?php the_title(); ?>" title="Share on Facebook.">
<img src="<?php bloginfo('template_directory'); ?>/custom/images/facebook.png" alt="Share on Facebook" id="sharethis-last" />
</a>
<a href="http://twitter.com/home/?status=RT @username <?php the_title(); ?> : <?php echo get_tiny_url(get_permalink($post->ID)); ?>" title="Tweet this!">
<img src="<?php bloginfo('template_directory'); ?>/custom/images/twitter.png" alt="Tweet this!" />
</a>
</p>
</div>
<div style="clear:both;"></div>
</div>
<?php
}}

You can place the code in two ways first way paste the code in cuctom_function.php.

  1. For this goto thesis options in wordpress dash board.
  2. Select custom file editor and choose cuctom_function.php
  3. Click on edit file and paste the code then save it.

The second way paste the same code in launch.php  which is available in the this path publicl_html/fourblogger.com/wp-content/themes/thesis_16/lib/functions/launch.php using ftp. use any one of the above ways to paste the code.

Once you pasted the above code. Copy and paste the following code in custom.css file

/*Adds Social Media icons in each post*/
.box { margin: 2.1em 2.1em 2.1em 1em; padding: 1.2em; background: #EDEDED; -moz-border-radius:10px 10px 10px 10px;
border: 1px solid #DFDFDF;}
.box h3 { margin-top: 0.5em; font-size: 2em; line-height:35px; }
.box p { margin-bottom: 0; }
.box .share {float:left; width:38%;height:50px;}
.box .social_icons {float:right; width:60%; padding:0.2em;}
.box .social_icons a, .box .social_icons a:hover {border:none;}
.box .social_icons img {filter:alpha(opacity=100); -moz-opacity: 1.0; opacity: 1.0;-khtml-opacity: 1.0; }
.box .social_icons img:hover {filter:alpha(opacity=50);-moz-opacity: 0.5; opacity: 0.5;-khtml-opacity: 0.5;}

For this,  goto thesis options in wordpress dash board.

Select custom file editor and choose cuctom.css

Click on edit file and paste the code then save it. The above code you can change background,width and height. Now visit your site with book marking icons.

For more checkout our all Thesis theme tutorials..

VN:F [1.9.13_1145]
Rating: 0.0/5 (0 votes cast)

Related Tutorials:

  1. How to add Google Buzz Button inside post and Homepage of Thesis Theme
  2. How to Create Custom Social Bookmark Links Widget in Thesis Theme
  3. How to add Social Bookmark Icons at Right Side of the Post in Thesis Theme
  4. How to add Tweet meme Button inside the Teaser and postbox of Thesis Theme
  5. How to add your social bookmark icon into Thesis theme

{ 12 comments… read them below or add one }

Rajesh Kanuri @ TechCats

I suggest you to add random screenshots as y r also briefing the post which will be helpful for the users with low bandwidth..

Reply

Pascal

Rajesh,

Thanks for your suggestion. Soon I will add screen shots in my posts including the previously published one.

Reply

Ricky

Thanks for the tutorial. Although I own thesis I don’t use it but soon I’ll be using it.

Reply

Pascal

@Ricky
Adding social bookmarking icons below every post encourages your visitors to use it. So try to use on that.
Thanks.

Reply

Pavan Somu

Posting a video tutorial is a easy and good way for understanding. Good Job.

Reply

Pascal

We have dedicated our blog for completely video tutorials. You can subscribe to our youtube video channel for more tutorials.

Reply

Mary Hutson

Hi,

Thank you for this information. Would you please give an example of how to add a LinkedIn link? I am new to .php and I’m getting lost.

Thank you

Reply

Pascal

Here i gave the link of particular post, http://fourblogger.com/how-to-add-social-bookmark-button-links-in-posts/
you can go that particular post. In inside of post, codes are available. After twitter code add the following code.

<a href="http://www.linkedin.com/in/fourblogger/ sharer.php?u=&amp;t=” title=”Share on Facebook.”>
<img src="/custom/images/linkedin.png” alt=”Share on Facebook” id=”sharethis-last” />

Above code you can replace your url and image path url instead of fourblogger.

Reply

Pascal

Place these code above the author box in custom_function.php

Now your problem rectified.

Reply

Vivek

I have added the codes successfully. i only want to ask that how i can put these icons in the middle as you can see that they are being placed on the left side of the after the post.

Reply

Suresh

hai vivek,

In your custom_functions.php code you dont have div class name. Thats why your css code doesnt taken into the design..
check custom_functions.php file line 22 and 25 in the above post, Then give div class name box,share and social_icons in your site..

Reply

bill

The video tutorial is very useful because you can see thinks in action!Nice job!

Reply

Leave a Comment

Previous post:

Next post:


Popular Tags:

    add stumbleupon button to thesis theme, how to add the button img in php, thesis theme social icons fourblog, thesis homepage social icons, fourblogger thesis theme social icons, how to put facebook social plugin inside ap div, inside social buttons, php social bookmark button, putting share buttions feature post thesis, social bookmarking wordpress theme