Archives for September 2010

How to Use Thesis Hooks

Thesis Hooks make your job as website designer easier by giving you a simple way to modify the Thesis theme.  Here is a quick introduction.

Instead of making a number of changes in as many different files,  hooks enable you to hook into the theme framework while keeping all your changes in a single file. They are placeholder to add or subtract from the basic functionality of the theme.

This consolidation makes your design “future proof” since changes to the underlying theme or to WordPress is not affected.

The coolest thing about hooks is that by finding the appropriate Thesis hooks, you can customize the theme to do just about anything you want.

Let’s take an example:

Place Thesis Navigation Menu beneath the header
remove_action('thesis_hook_before_header' , 'thesis_nav_menu');
add_action('thesis_hook_after_header' , 'thesis_nav_menu');

To see it on your own installation, just copy the following lines into your custom_functions.php file in Thesis. The easiest way to do this is to start from your WordPress dashboard. Then click on the Custom File Editor under the Thesis heading on the left hand side of the dashboard.

From the example above you can see that the first line removes the navigation menu from its original position above the header. The second line simply re-inserts it after the header.

Simple, isn’t it?

Ok, for non-technical people, there is a bit of a learning curve. But after you learn a few simple techniques once you are good well into the future. Thesis is responsible keeping your design working with future upgrades of WordPress.

Now, let’s try adding some of our own text in. Most people want to change the footer from the default. Here is how you do it:

/* Custom Footer Hook */
remove_action('thesis_hook_footer', 'thesis_attribution');
function add_custom_footer ()
Roger Easlick,, 700 Eastlake Trail, Oxford, MI 48371, 248-841-4918

Privacy Policy - Terms of Service

add_action('thesis_hook_footer', 'add_custom_footer');

For techniques you haven’t mastered I am more than willing to help.

Get Thesis today and start blogging on a professional looking site right out of the box.