Custom WordPress Designing with Thesis

Written by Jeremy LaDuke

If you have ever had the privilege of doing any custom design work within the Thesis Theme you will know that feeling that makes you gouge your eyes out with a dull spoon, only after you do the same to the creators of the most backward, convoluted, theme ever.   I will add this note to my open disdain for the theme.  The client I had was using version 1.8 and they are now on 2.? I believe.  So hopefully some of these issues have been resolved.

To get anything to work the way you want it to that isn’t already a part of the theme and layout (other than minimal control over font color and size and header images) you have to dig into the file structure of Thesis and tweak it.  They take the liberty of stripping WordPress of its coder-friendly structure with most of what you need readily accessible in the root theme folder and replacing it with their own file structure and coding heirarchy.  So going in and editing a post or page or adding a new type of page template isn’t as easy as editing something like ‘page.php’ or ‘single.php’.  No rather, you have to edit their custom-functions.php file and add your own functions just to make a page template.  Woohoo!!  So, if you are really bored and you have all the code of WordPress down then check out thesis and you essentially get to learn a new platform within a platform.  And the great thing is, it doesn’t make anything about WordPress better, but alternatively it makes it worse…… I digress….


The reason I am posting this is to help someone who may find themselves in the position I was in tonight.  Once you edit the custom-functions file and it’s enabled in the functions.php file then it may give you a white screen after saving posts, pages, options, etc in the dashboard.  If your code is good then it won’t break the site, but it will give you a headache.  I could not track down what exactly was wrong with it.  I checked all the usual suspects of memory shortages, an blank line at the end of the code, etc.  So after I had no luck with those I had an epiphany… If it looks fine on the front end, but causes a hassle on the backend then I won’t let it get called on the backend.  And to do so I used this code:

if ( in_array( $GLOBALS[‘pagenow’], array( ‘wp-login.php’, ‘wp-register.php’ ) ) || is_admin()) { }
else { require_once(THESIS_CUSTOM . ‘/custom_functions.php’); }

Slap that sucker in functions.php and you’re good to go.  I hope this helps someone out there!

Leave a Reply