10 hacks for the Thesis WordPress theme

Thesis is a very cool WordPress Theme and it have many built in options. But as you know, I really love to tweak WordPress to make my blogger life easier.
This is why, when I started to use the Thesis theme here on Cats Who Blog, I searched the internet for hacks and played a lot with the theme.

Today, I’m glad to show you 10 of the most awesome Thesis hacks, to get the most our of your favorite WordPress theme!

Include a clickable logo

Out of the box, it is not possible to include a logo in your Thesis theme header. Though, it can be done easily using internal hooks.
To apply this hack, paste the following code into your custom_functions.php file.

function add_header_image () {
echo "<a href=\"http://www.yourblogurl.com/\" title=\"Your Blog Title\">
<img src=\"THE-URL-OF-YOUR-LOGO-GOES-HERE\" alt=\"Your Blog Title\" height=\"170\" width=\"528\" style=\"border:0px\" /></a>";
}
add_action('thesis_hook_after_title', 'add_header_image');

Source : http://www.sugarrae.com/thesis-hooks-dummies-tutorial/


Place Thesis menu below header

By default, Thesis places navigation menu above the blog header. It is quite cool but some people prefer to have the menu below the header. If you do, just paste the following in your custom_functions.php file to make the menu appearing below the header:

remove_action('thesis_hook_before_header', 'thesis_nav_menu');
add_action('thesis_hook_after_header', 'thesis_nav_menu');

Source : http://rumahabi.com/how-to-move-thesis-main-navigation-below-header.html


Changing Thesis Footer

A sure thing is that Thesis users are very familiar with the “Get smart with the Thesis WordPress Theme” phrase displayed automaticaly in the footer. Using the following hack, you’ll be able to replace it by the text of your choice. Remember that you have to keep a link to Thesis website, excepted if you’re owning a developer licence.

Once again, this code have to be pasted in your custom_functions.php file.

remove_action('thesis_hook_footer', 'thesis_attribution');

function add_custom_footer () { ?>
	   <p>&copy; 2008 Ourblog.com – All rights reserved. – <a href="http://www.ourblog.com/privacy-policy/">Privacy Policy</a></p>
<?php }

add_action('thesis_hook_footer', 'add_custom_footer');

Source : http://www.sugarrae.com/thesis-hooks-dummies-tutorial/


Add a “Subscribe to RSS” message below your posts

In order to build a strong readership and increase your Feedburner count, you should definitely add the well known “Subscribe to RSS” box below your posts.
Paste this code into your custom_functions.php file. And of course feel free to modify it to fit your needs. It can, for example, be used to let your reader know about your latest ebook or product.

function subscribe() {
    if (is_single()) { ?>
        <p class="alert" style="text-align:center;">Did you enjoy this article? Please subscribe to YOUR LINK to receive all the FREE updates!<p/>
    < ?php }
}

add_action('thesis_hook_after_post', 'subscribe', '1');

Source : http://www.howtomakemyblog.com/thesis/8-thesis-theme-design-tips-to-make-your-blog-better/


Add 125*125px Advertisments on Thesis sidebar

125*125 pixels ad banners are very popular and you should sell some of your blog space to advertisers and make yourself some dollars.
First, paste the following in your custom_functions.php file:

function custom_ADS() { ?>
<div class="ads">
   <h3>Franklin's Sponsors</h3>
   <a href="#"><img src="add1.gif" alt="" /></a>
   <a href="#"><img src="add2.gif" alt="" /></a>
   <a href="#"><img src="add3.gif" alt="" /></a>
   <a href="#"><img src="add4.gif" alt="" /></a>
   <a href="#"><img src="add5.gif" alt="" /></a>
   <a href="#"><img src="add6.gif" alt="" /></a>
  </div>
<?php }
add_action('thesis_hook_before_sidebars', 'custom_ADS');

Once done, paste the CSS code in your custom.css file:

.custom .ads { text-align: center; }
.custom .ads img { margin: 5px; }

That’s all. Don’t forget to create a killer “Advertise” page to sell your ad spots!
Source : http://franklinbishop.net/thesis-tutorial-ads-in-sidebar


Optimise your posts for Adsense

As you probably know, Adsense scans to content to display related ads to your visitors. The only problem is that sometimes ads aren’t as relevant as you wish they were.
To fight irrelevant ads, you should definitely implement what web marketers are calling section targeting.
It is an Adsense approved method of telling the ad serving algorithm which parts of your websites to pay attention to and which parts to ignore.

Simply copy the code below and paste it on the custom_functions.php file of your Thesis theme.

function open_adsense_targting() {
    echo "<!-- google_ad_section_start -->";
}

function close_adsense_targting() {
    echo "<!-- google_ad_section_end -->";
}

add_action('thesis_hook_before_post','open_adsense_targting' );
add_action('thesis_hook_after_post', 'close_adsense_targting');

Source : http://www.wolf-howl.com/blogs/thesis-tutorial-adsense-section-targeting


Customize your 404 page

Ever wanted to customize your 404 page? It is possible to do it using a simple hook. All you have to do is to paste the code below into the custom_functions.php of your Thesis theme directory and edit it a bit to fit your needs.

function custom_thesis_404_title() { ?>
    YOUR 404 PAGE HEADING HERE
<? }

remove_action('thesis_hook_404_title', 'thesis_404_title');
add_action(thesis_hook_404_title', 'custom_thesis_404_title');

function custom_thesis_404_content() { ?>
    <p>WHATEVER YOU WANT YOUR 404 PAGE TO SAY HERE</p>
<? }

remove_action('thesis_hook_404_content', 'thesis_404_content');
add_action('thesis_hook_404_content', 'custom_thesis_404_content');

Source : http://www.sugarrae.com/thesis-tutorial-custom-404


Insert TweetMeme Button Without a Plugin

If you’re a blogger yourself, I’m pretty sure that you already experienced how many quality visitors Twitter can bring to your blog. This is exactly why so many blogs display those “Tweetmeme” button which allow your readers to share your blog posts on Twitter and also show how many time the blog post has been retweeted.

Just insert this portion of code into your custom_functions.php file and the Tweetmeme button will be automatically displayed on all your posts.

function author_avatar() {
if (is_single()) {
    echo '<div style="float:right; padding-left: 5px;"><script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script></div>';
   }
}
add_action('thesis_hook_before_headline', 'author_avatar');

Source : http://mattflies.com/tech/3-easy-and-highly-requested-thesis-theme-tutorial/


“List style” Archive page template

Out of the box, Thesis comes with an “Archive” page template. Althought the template is pretty cool by default, some users, including myself, prefer an “Archive” page which list all posts.
Paste the following code in your custom_functions.php file in order to replace the default archive template by a list of all posts.

function my_archive() { ?>
	<ul>
		<?php
		$my_query = new WP_Query('showposts=-1');
		while ($my_query->have_posts()) : $my_query->the_post(); ?>
				<li><?php the_time('d/m/y') ?>: <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
	<?php endwhile; ?>
	</ul>
<?php
}

remove_action('thesis_hook_archives_template', 'thesis_archives_template');
add_action('thesis_hook_archives_template', 'my_archive');


Add author info 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.
Again, you just have to paste the following into your custom_functions.php file to get it working.

function post_footer() {
	if (is_single()) { ?>
		<div class="socialmedia">
		<p><strong>Share this post:</strong>
		<a rel="nofollow" href="http://twitter.com/home/?status=<?php the_title(); ?> -  http://YOUR_URL.com/?p=<?php the_ID(); ?>">Tweet It</a> | <a rel="nofollow" href="http://www.facebook.com/sharer.php" onclick="window.open('http://www.facebook.com/sharer.php?u=<?php the_permalink() ?>&t='+encodeURIComponent(document.title), 'facebook','toolbar=no,width=700,height=400'); return false;">Facebook It</a> | <a rel="nofollow" href="http://www.stumbleupon.com/submit?url=<?php the_permalink() ?>">Stumble It</a> | <a rel="nofollow" href="http://www.digg.com/submit?phase=2&url=<?php the_permalink() ?>">Digg It</a> | <a rel="nofollow" href="http://del.icio.us/post?url=<?php the_permalink() ?>&title=INSERT_TITLE">Delicious It</a></p></div>

		<div class="postauthor">
			<?php echo get_avatar( get_the_author_id() , 120 ); ?>
			<h4>Article by <a href="<?php the_author_url(); ?>"><?php the_author_firstname(); ?> <?php the_author_lastname(); ?></a></h4>
  			<p><?php the_author_firstname(); ?> has written <strong><?php the_author_posts(); ?></strong> awesome articles for us. <?php the_author_description(); ?></p><p>If you liked this post, you will definitely enjoy our others. Subscribe to the feed via RSS or EMAIL to get instantly updated for those awesome posts soon to come.</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:

.postauthor { background: #F5F5F5; border-top: 1px solid #e1e1e0; border-bottom: 1px solid #e1e1e0; overflow: hidden; padding: 1.5em; }
.postauthor img { border: 5px solid #e2dede; float: left; margin-right: 1.5em; }
.postauthor h4 { color: #666; font-size: 2em; margin-bottom: 5px; }
.postauthor p { color: #515151; font-size: 13px; margin-bottom: 12px; }
.socialmedia { background: #FFFBCC; border-top: 1px solid #E6DB55; border-bottom: 1px solid #e1e1e0; overflow: hidden; padding: 1em; text-align: center;}
.socialmedia p { color: #515151; font-size: 1.3em;}

Source : http://mattflies.com/tech/10-ways-to-customize-thesis-and-enhance-your-blog/


I hope you enjoyed these hacks and that they’ll help you to get the most out of your Thesis theme! By the way did you checked out my gallery of the 10 most awesome Thesis customizations?

Related Posts with Thumbnails

24 Comments

  1. Posted November 30, 2009 at 2:17 pm | Permalink

    Very useful list of tutorials.

    I am thinking of moving to thesis but I am also inclined a bit towards headway theme. Which do you think is better?

  2. Posted November 30, 2009 at 3:29 pm | Permalink

    @Agent WordPress : They’re both great, I know Thesis more so I’d say Thesis :)

  3. Posted November 30, 2009 at 4:21 pm | Permalink

    Really cool, makes me wants to get thesis! But I don’t understand why those tips are only for Thesis? Don’t they work on other themes as well?

  4. Posted November 30, 2009 at 4:26 pm | Permalink

    @Steve : Thesis is a WordPress “Theme framework”, so it doesn’t work exactly the same way that other themes. This is why those hacks only applies to Thesis.
    And yes, you should definitely get one :) It is the theme I use here at CatsWhoBlog.

  5. Posted November 30, 2009 at 4:51 pm | Permalink

    I see :) Thank you Jean.

  6. Posted November 30, 2009 at 10:36 pm | Permalink

    great

    thank you

  7. Posted November 30, 2009 at 11:57 pm | Permalink

    Wonderful! Thanks for the great list!

  8. Posted December 1, 2009 at 5:46 pm | Permalink

    Nice hacks, and they’re easily convertible to other theme frameworks. As I noticed, they all have equal hooks and filters, they’re just named differently and some little details differ too.

    It’s funny (but not surprising) how one always posts tips & hacks basing on the theme they use. I too posted 6 useful Thematic hacks a little while ago. (I’m not linking to preserve my anti-spam pride though ;) )

  9. Posted December 1, 2009 at 5:50 pm | Permalink

    @Eugen R : Yes, tweaking Thesis for my own needs I found many cool hacks that I decided to share with other bloggers :)

    Though, Thematic hacks, hook & filters should be a very good idea for a future post, I might seriously think about it!

  10. Posted December 1, 2009 at 5:56 pm | Permalink

    Thank you. Great list.

  11. Posted December 1, 2009 at 6:30 pm | Permalink

    Love it. Hacks are fun and exciting!

    Thanks!

  12. Posted December 3, 2009 at 9:15 am | Permalink

    Oh!! I have done all of this. I expect more from you.

  13. Posted December 8, 2009 at 9:03 pm | Permalink

    Thanks…. I have a question about (archive_info). How do I get that one to work out? I would like to have some text below one of my category´s. So I haven´t figured out how I target a hook to a certen generic page ore blogpost.

  14. Posted December 8, 2009 at 9:30 pm | Permalink

    @Nicklas Larenholtz : I don’t really understand what you mean. If you want a “live demo” of what the archive hack do, have a look there : http://www.catswhoblog.com/archives

  15. Posted December 8, 2009 at 10:01 pm | Permalink

    hmmm, how do I explaine this…. Well, check out my archive (sem-larenholtz.se/category/sokmotormarknadsforing/), just underneath the Title “sökmotormarknadsföring” I would like to have a box with some content. As I understand this hook name is “archive_info” but how do i make some content only appere in that category with this (thesis_hook_archive_info). I tried the tutorial from sugarrae (sugarrae.com/thesis-tutorial-creating-custom-categories/) but it just mess upp my archive page. And the content apperes in every category.

  16. Posted December 8, 2009 at 11:17 pm | Permalink

    @Nicklas Larenholtz : Sorry but I don’t have any idea for now. Have you tried Thesis support forums? There’s a strong chance that someone have your solution there. Good luck!

  17. Posted December 9, 2009 at 4:31 am | Permalink

    Outstanding tips.. I’ve enjoyed all of them however there are few things i would like to know:

    1# Is there any way to by which i can apply these hacks on several blogs without editing custom_functions.php every time. Will replacing default custom_functions.php file with the modified custom_functions.php do the trick ?

    2#How to Wigetize the footer/Wigeted footer ?

    A lot of thanks to you for your efforts !

  18. Posted December 9, 2009 at 8:01 am | Permalink

    Japp,, found it.. i pasted the code from sugarrae in another php file. It works now with some few adjustment´s.

    Thanks for taking your time.

  19. Posted December 9, 2009 at 10:25 am | Permalink

    @Neel : To answer your questions :
    1 – Yes
    2 – You have to create a function that add a widgetized area, and then use one thesis hook to apply it to the theme. Hard to explain with words, but not very hard to code.

  20. Posted December 21, 2009 at 12:52 pm | Permalink

    Nice Hacks Thanks! , this post help me for building a new blog :)

  21. Posted January 7, 2010 at 11:12 pm | Permalink

    Hey Jean Baptiste,

    i “life” exactly one year with two themes from Justin Tadlock. You know him from themehybrid.com. 10 Months with the beloved visionary Theme for that i’ve made some tweaks. The last two Months i switch to an hybrid child theme with some modifications.

    Where is the big difference between thesis for 87,- bucks and the Hybrid Theme with support for 25,- $.
    I would start to learn the difference but not for 87,- “Learning Fee”! Can you post an list about the pro & contra of the two fabolous themes??

  22. nicole
    Posted January 18, 2010 at 9:00 am | Permalink

    Thank you for these tips.

  23. Jon
    Posted February 2, 2010 at 4:33 am | Permalink

    Is there no way to change the search results markup? There seems to be no documentation about this anywhere. I’m starting to think the whole thing is a scam.

  24. Posted May 30, 2010 at 6:15 am | Permalink

    great hacks,great tips,
    thank you

9 Trackbacks

  1. By uberVU - social comments on November 30, 2009 at 12:07 pm

    Social comments and analytics for this post…

    This post was mentioned on Twitter by Jean-Baptiste Jung: RT @tweetmeme 10 hacks for the Thesis WordPress theme http://bit.ly/5lHO6c...

  2. [...] to build even better websites. By the way if you're into WordPress, I just published a very cool hacks list for Thesis on Cats Who Blog, so you might want to check it out. Also, have you grabbed your copy of the [...]

  3. By 10 hacks for the Thesis WordPress theme on November 30, 2009 at 7:12 pm

    [...] the rest here: 10 hacks for the Thesis WordPress theme Share and [...]

  4. [...] build even better websites. By the way if you’re into WordPress, I just published a very cool hacks list for Thesis on Cats Who Blog, so you might want to check it out. Also, have you grabbed your copy of the [...]

  5. By 10 hacks for the Thesis WordPress theme » Viz vaz on November 30, 2009 at 10:30 pm

    [...] Go here to see the original: 10 hacks for the Thesis WordPress theme [...]

  6. By WPscoop on November 30, 2009 at 11:10 pm
  7. By untell.com on December 6, 2009 at 9:26 am

    10 hacks for the Thesis WordPress theme…

  8. By Headway WordPress theme review on December 11, 2009 at 4:29 pm

    [...] ask me why. Then, some days ago someone mentioned Headway in comment left under my “10 hacks for Thesis” post, asking which theme, between Thesis and Headway, was the [...]

  9. [...] Thesis tema di blog ini, sekarang  giliran kita fokus  untuk Thesis pesaing utama kita, yang sangat kuat dan lengkap yang disebut kerangka tema [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting