4 Nifty Code Snippets to Trick Out Your Thesis Theme
To make some really smooth changes with just a few snippets of code, copy and paste the following code snippets into your custom.css and/or custom_functions.php files.
1. Remove the outlines around your links

Add this code snippet to your custom.css file:
.custom a {outline: none;}

2. Remove the grey line below the navigation bar/menu
.custom #tabs {
border-bottom: none;
}
Click here to find out how to remove all grey lines.
3. Automatically add post content using hooks
Would you like to add some text and images somewhere in your Thesis Theme without hard coding it?
Use Thesis OpenHook plugin and insert a few lines of code where you want the content to appear.
Suggestion to place post content using Thesis OpenHook plugin:
- Add post content to the top of your sidebar (like in my example image above)
- Add post content to the bottom of a post – like subscriber information, social bookmarking icons or ads
Step 1: Create the content
Create a post with the information you want to appear in the sidebar.

In the category and tag options, create a new category (e.g. ‘info’) and give it a unique tag (e.g. ‘about’).
Step 2: Copy and paste the code snippet into the custom hook box
<?php query_posts('category_name=info&tag=about&showposts=1'); ?>
<?php while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile;?>
In this example, I selected the before_sidebar_1 hook
Remember to check the ‘Execute PHP on this hook’ box.- Hit your Little Ass Save Button and check your results.
You can reuse this code snippet and place extra tailor made pieces of information all over the place :-) Have fun with it.
4. Add Style to Popular Posts in Your Sidebar
If you would like to style your sidebar content like I have with my ‘Popular Articles’, here is how to do it.
Grab Rob Marsh, SJ’s Popular Posts plugin and the companion plugin Post Plugin Library.Use the ‘Add New’ function on your Plugins page to search for ‘Popular Posts’ and look for Rob Marsh, SJ to know it is the right one.
You can also add/install his other plugins – Similar Posts, Recent Posts, Random Posts and Recent Comments - and style them in the same way – using different colours perhaps).
- Just swap out the word ‘popular’ in the code below with ‘Similar’, ‘Recent’, etc.
Add the following code to your Custom.css file and replace the background and outline colour codes with ones that suit your site.
#popular-posts li {
background: #EEEEEE;
border: 1px solid #05396B;
line-height: 1.4em;
-moz-border-radius: 5px;
padding: 1.2em;
-webkit-border-radius: 5px;
}
If you have a darker sidebar, a lighter coloured background looks quite nice.
Let me know how you went :-)






Add a Comment
I think publication in journals and online goes a long way toward spreading your name and work around and garnering interest. ,
Absolutely. Also publishing a couple of short articles on eZine or other article directories gives you good incoming links and helps build you credibility. My only suggestion is publish quality stuff – your best – so you don’t get seen as just doing it for the links.
Thank you so much for the great Thesis tips, very useful as I am getting ready to publish a new blog!
Hesham´s last blog ..I am Buying Thesis Membership so Post your Affiliate Link on this Post
Very useful code and tweaks. I particularly liked the Popular Posts modifications as I already use the Popular Post and Post Plugin Library. Thanks for sharing.
Mike Tech Tips´s last blog ..Microsoft Windows 7 Release Insights
Works well except my header on the right side is dropped. Do you know how to fix this?
You’ll have to style your ad to go to the right more.
I can see the ad is floating over your header/logo. If you are using Thesis OpenHook to add the advertisement to your header, style it with html, something like this:
Give your image a div id of “header_advert”
Then, add some css like this – you’ll have to adjust the top padding and padding-left to get it to sit in the right place in your header area:
.custom #header_advert {float: right; position: absolute; width: 468px; height: 60px; top: 50px; padding-left: 460px;}I would like to turn my static site into a thesis theme can you do this for me? HEre’s the site http://www.vegasheroes.com/ Thanks.
I guess, Snippets are great specially if you know how to use and create them. But then, if you are not that too techie, you can just use other formats that automatically do the Snippets on our behalf. Thank you.