When you first start working with Thesis, you're going to see a lot of references to hooks. But unless you're already used to customizing code in WordPress, it can be a confusing concept to wrap your head around (at least it was for me!).
A hook is simply a predefined place within your blog’s code where you can insert your own pieces of code (functions) to alter the design and add extra functionality to the default theme. There are approximately 50 hooks you have access to, which gives you a lot of flexibility.
For example, if I wanted to add a blue rectangle across the top of the page, I would use the thesis_hook_above_html hook. You can see the results below.

In plain English, I wrote some code to create a blue rectangle, then told Thesis to put it at the very top of the page. Now, if I wanted to put the same rectangle under the header graphic, I would tell Thesis to place the code in thesis_hook_after_header.

And if I wanted it at the top of the sidebar area, I would use thesis_hook_before_sidebars.

Note that the rectangle changes width depending on where it is because I’ve coded it to be 100% of the hook’s width to give you a better sense of which part of the layout it covers.
You can find a full list of available hooks on the DIYthemes site. And if you’re more the visual type, check out this great hooks map created by Thesis Hacker.
In future posts, I'll be discussing how to create functions to put in the hooks. In the meantime, you can find more information about hooks and other basic Thesis concepts in the Thesis Theme Starter Pack. This eGuide is available as a free bonus for anyone who purchases Thesis through this site (including upgrading to the Developer option) and is also available for sale for people who already purchased Thesis elsewhere. And until January 31st, the Starter Pack is available at a special introductory price of only $7.46, a 25% discount off the regular price!
You can also sign up for the free Thesis e-newsletter to have more tips and tricks sent directly to your Inbox.
Sign up for the Thesis newsletter to get more great tips, delivered right to your Inbox!Posted in Blogging, How To, Social Media, Thesis


















{ 1 trackback }
{ 0 comments… add one now }