8 Most Wanted Hacks for Thesis WordPress Theme

Thesis is a very cool WordPress Theme and it have many built in options. It is one of the most recommend wordpress theme for bloggers.  Today i’m going to show the most wanted hacks for thesis wordpress theme.

Here are 8 Most Wanted hacks For Thesis WordPress Theme

1. Add Social Media Floating Buttons

Do you ever thought of adding floating social media buttons but can’t able to add it. Here is the complete code to add social media buttons in thesis theme.

function sharepost() {
if (is_single()) { ?>
<div class="sharepost">
<div class="sharer">
<a href="http://twitter.com/share" data-count="vertical" data-via="tnsblog">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</div>
<div class="sharer">
<script src="http://www.stumbleupon.com/hostedbadge.php?s=5"></script>
</div>
</div>
<?php
}
}add_action('thesis_hook_after_headline', 'sharepost');

Once you’re done with it, insert the following styles in the custom.css file:

.sharepost{
 float:left; border:1px solid #737373; margin-right:20px; top: 240px; position:fixed; background:#FFF; margin-left:-105px; width:64px; z-index:0
 }
.sharer{
 padding: 6px;
 border-bottom: 0px solid #e8e8e8;
 }
.sharer-fb{
 padding: 6px;
 padding-bottom:2px;
 margin-bottom:1px;
 border-bottom: 0px solid #e8e8e8;
 }

2. Add Author Image Next to Blog Post Title

Do you run a Multi-authors blog (Technshare) then you should definitely consider adding author image next to blog post title.

You just have to paste the following into your custom_functions.php file to get it working.

/* Author Avatar in Headline area */
function author_avatar() {
if (!is_page() and !is_single())
{
?>

<?php echo get_avatar( get_the_author_id() , 55 ); ?>
<?php
}
}
add_action('thesis_hook_before_headline', 'author_avatar');

Once you’re done with it, insert the following styles in the custom.css file:

.custom .headline_area .avatar {float:left; border:3px solid #ddd; marg

3. Add Logo Next to Headings in Blog Post

You just have to paste the following into your custom.css file to get it working.

.custom #content h3 {background:transparent url('images/content_h2_bg.png') no-repeat left top; line-height:24px; padding-left:30px;}

4. Add Author Box After each Post

Is your blog powered by multiple authors, or do you often invite guest-bloggers? If yes, you should definitely consider adding authior info, picture and bio after each post.
You just have to paste the following into your custom_functions.php file to get it working.

/* Author Box below the headline */
function post_footer() {
 if (is_single())
 {
 ?>
 <div class="postauthor">
 <a rel="external" target="_blank" href="<?php the_author_meta('user_url'); ?>"><?php echo get_avatar( get_the_author_id() , 68 ); ?></a>
 <h4>Article by <a target="_blank" href="<?php the_author_url(); ?>">
 <?php the_author_firstname(); ?> <?php the_author_lastname(); ?></a></h4>
 <p><?php the_author_description(); ?></p>
 <p><?php the_author_firstname(); ?> has written <span><?php the_author_posts(); ?></span> awesome articles for Us.</p>
 </div>
 <?php
 }
}
add_action('thesis_hook_after_post_box', 'post_footer');

Once you’re done with it, insert the following styles in the custom.css file:

.custom #comments { clear: both; }
.postauthor { background: #F5F5F5; border-top: 1px solid #e1e1e0; border-bottom: 1px solid #e1e1e0; overflow: hidden; padding: 1.5em; margin-top:7.5px; margin-bottom:6px; }
.postauthor img { padding-bottom: 0px; border: 5px solid #e2dede; float: left; margin-right: 1.5em; margin-bottom:2px; }
.postauthor h4 { color: #666; font-size: 1.55em; margin-bottom: 5px; text-decoration:none; }
.postauthor p { color: #515151; font-size: 13px; margin-bottom: 12px; }
.postauthor p.hlight { margin-top:5px; font-size: 11px; text-transform: uppercase; }
.postauthor p.hlight span { color: #CB3131; font-size: 13px; font-style: italic; font-weight: bold; letter-spacing: 0.8px; }

5. Add Twitter Button

You just have to paste the following into your custom.css file to get it working.

function add_tns_twitter_btn ()  {
if (is_single()) { ?>
<div style="float:right; padding-left:3px;"><a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="wpkube" data-related="WPKube: A blog all about WordPress">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>

<?php
   }
}
add_action('thesis_hook_before_headline','add_tns_twitter_btn');

Don’t forget to replace the code between <a href and <script> with the code generated by Tweetbutton page.

6. Contributors can Upload images

Again, if you run a mutli author blog then you should defiantly consider this.

if ( current_user_can('contributor') && !current_user_can('upload_files') )
add_action('admin_init', 'allow_contributor_uploads');
function allow_contributor_uploads() {
$contributor = get_role('contributor');
$contributor->add_cap('upload_files');
}

7.  Add Your Logo To The WordPress Login Screen

function my_custom_login_logo() {
echo '<style type="text/css">
h1 a { background-image:url(http://www.technshare.com/wp-content/uploads/2010/07/technsharelogin.png)!important;  }
</style>';
}
add_action('login_head', 'my_custom_login_logo');

8. Add Lazy Load for Images

First of all you need to download these files (right-click “save as”)

jQuery Lazy Load (minified) | Lazyload.gif

and then upload the files to wp-content/uploads/ folder.

Once you’re done with it, insert the following styles in the custom_functions.php file:

function lazy_load_html() {
?>
<script src="/wp-content/uploads/jquery.lazyload.mini.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function($){
if (navigator.platform == "iPad") return;
jQuery("#content,#footer").find("img").lazyload({
placeholder : "/wp-content/uploads/lazyload.gif",
effect : "fadeIn"
});
});
</script>
<?php }
add_action('thesis_hook_after_html','lazy_load_html');

Source: Gregrickaby

Do you have any thesis hack that you would like to add?

About the Author: Devesh Sharma is a WordPress fanatic and loves experimenting with WordPress themes & plugins. Get more from Devesh on  and Twitter.

You May Also Like:

20 comments… add one
  1. Great post, Devesh. I love Thesis and use it on all of my blogs. I think I’m pretty well versed when it comes to customizing it, but you definitely mention some things here that I haven’t seen before, so thanks!

  2. Nice tricks and tutorials and I am sure Thesis fans love it too :-)

  3. Andy @ FirstFound says:

    Cheers for this, it’ll be very helpful!

  4. Where should I copy wordpress login page code..

    • Add that code in custom_functions.php file.

      Thanks. If you need any help about wordpress then don’t hesitate to contact us ;) .

      • I had installed “Lazy Load” but still it is normal only..
        More over I way looking for two more customization…
        “Read More button aligning right in a new line” and quote style like this
        http://img24.imageshack.us/img24/2761/captureny.png

        • I think you haven’t installed the lazy load script and image.

          For aligning read more button. Add this code in custom.css

          .custom a.more-link { margin-top: 12px; float:right; background: #1C88C7; color: #FFF;
          padding: 2px 8px 3px 5px; text-decoration: none; padding:40px;
           -moz-border-radius: 5px; -webkit-border-radius: 5px; }
          

          And for blockquote i need to see your thesis site.

          • Thanks.. I used the script in a new folder in uploads/scripts and changed the location in the custom_fuctions.php
            It worked !! :)
            Btw, I use Easythesis skin in thesis

  5. Riley Harrison says:

    Well I’m a proud new owner/user of thesis and I will bookmark this post so that when I get up to speed technically I’ll begin to experiment. Thanks for demonstrating what’s possible

    • That’s great to hear man. Thesis is one of the most powerful WordPress theme out there.

      Thanks for the comment Riley.

  6. Adam Hoeksema says:

    I am somewhat of a beginner. I have implemented the floating social media buttons code on my Thesis blog. I copied the first set of code at the bottom of the custom_functions.php file, and the second bit of code I copied at the bottom of the custom.css file.

    I saved and refreshed and saw no change. I even cleared cookies and restarted the browser but did not see the buttons. Is there something I am missing? Would someone be able to take a look at the site http://www.businessplanexecutivesummary.com

    Thanks. I really really want these buttons up on our site!

    • Hey Adam,

      I missed the div tag. Copy again, now it will work!

      If you need any help then don’t hesitate to contact us.

      • couple of questions:

        1. how do I make it appear next to each post on the home page?
        2. how do I make it stay up by the headline instead of following as you scroll down the page?

  7. Prasenjit @ Make Money Blogging says:

    Hi Dev,

    Can you tell me how to set featured image for every post like Blogussion? If I want to have a similar div called like “feat-image”, how should I go about it? Also if I want to set teasers like Famousbloggers, how should I do it?

    Awaiting your response.

    Thanks,
    Prasenjit.

  8. wow nice hacks man..worth bookmarking ;-)

  9. Tried the first one and it works, though it’s better to add more buttons on it. Thanks for sharing.

Speak Your Mind...

A Weekly WordPress Newsletter...

Subscribe now and you will get -

»  Free Guide – Building a Successful WordPress Blog.
»  Weekly Newsletter curating useful blog posts and resources.
»  Exclusive Discount & Deals on Premium Products.

Your email will never be shared with anyone.