Update – 17 July, 2012
In Thesis 1.8.4 the concept of ‘Design Mode’ was introduced.
If you make design or layout changes but they don’t show up when you check the front of your site, you’re probably not using Design Mode.
Original article starts here:
The Feature Box in Thesis gives you just about the most valuable piece of your site’s real estate to do whatever you want with.
But I’m sure you can get way more creative than that! 🙂
You could think of it the same way you’d think of a Text Widget: a blank sheet of paper to which you can add anything you like.
But, unlike a text widget, you can place it above your header, above your content, or above your content and sidebars.
And you can place it on every page and post on your site, the front page only or the blog page only.
All by simply selecting settings on your Design Options page.
So how do you make use of the Feature Box?
The first thing to do is to decide what content you want to place in your feature box and create it.
The reason I do this step first is because you have two ways of getting content into your feature box:
- Via a hook in your custom_functions.php file
- Via the OpenHook plugin (which I wrote about here)
… neither of which are great places to do your creative stuff!
As I’ve said before: if you’re editing your custom functions file always make sure that you can access it via FTP before you start. That way, if you create a fatal error you can still get into the file and correct the problem (or upload a clean version).
So create and view your content to make sure it’s to your satisfaction.
Typically I do this in Word (including the HTML mark up), copy and paste it into Notepad, save it as an HTML file and open it in my browser.
Don’t worry about the styling at this stage. You can create all your styling in the custom.css file using the
.custom #feature_box selector.
Once you’re happy with your content you have two ways to insert it into your Feature Box.
Insert content via Thesis OpenHook
If you’re not comfortable playing with the custom functions file, or can’t get FTP access to it, then you have no choice. You’ll have to use Thesis OpenHook (unless you’re seriously masochistic).
I wrote about how to use Thesis OpenHook here – check it out if you’re not sure of the process.
So, access your OpenHook screen, find the thesis_hook_feature_box hook (it’s in the content section), paste your content into the box that comes up, click ‘Execute PHP on this hook’, and hit the Little Save button.
That’s it – you’re all done.
Insert content via the custom functions file
You’ll need to create a new function, which will be the content you just created, wrapped in PHP tags.
Next you add the function to your feature box hook:
Click the Big Ass Save button and you’re done.
Positioning your Feature Box
To position your Feature Box on your site go to the Thesis Design Options screen and locate the Feature Box section:
Click the ‘+’ sign next to the heading to expand the options.
As soon as you select one of the options from the drop-down menu you’ll immediately be presented with a further set of options that enable you to define which pages you want it to appear on.
Make your selections, click the ‘Big Ass Save’ button and you’re done.
OK, that’s all there is to it – but it’s a powerful feature, so make use of it and enjoy!