Thesis on WordPress 2.7

This hack is no longer necessary as of the Thesis 1.3.3 release. You’re encouraged to upgrade!

WordPress 2.7 introduces a number of impressive new features — most importantly for me is a media uploader that works with Flash 10 — but it also prevented the Thesis theme framework‘s admin panel styling and JavaScript from loading.

This wasn’t such a big deal — most of the functionality still worked; however, JavaScript allowed unused parts of the admin panels to remain hidden until needed — you don’t need the two-column controls when using the three-column layout, for instance.

Thankfully, the fix is very easy.

As with most changes to Thesis, we’ll be looking to our custom/ folder for a place to put our changes; because this is a programmatic change, it will be going within custom/custom_functions.php, so open that file for editing.

You’ll want to add this bit of code to the file:

if (is_admin()) {
	function custom_options_js() {
		$date = date('mdy');
		echo '<script type="text/javascript" src="' . THESIS_JS_FOLDER . '/thesis.js?d=' . $date . '" /></script>';
	}

	add_action('admin_head', 'thesis_options_stylesheet');
	add_action('admin_head', 'custom_options_js');
}

You can probably place that code at the end of the file — or anywhere else within your organization of the file, provided the structure of all of the code remains sound. I placed this near the top, just after the opening <?php line.

This works for Thesis 1.3.2; I can’t say whether it will work for older versions, and hopefully it won’t be necessary for future versions. I also have no idea what will happen if you use this code while using a version of WordPress older than 2.7 — you’ll likely end up with the styling and scripting for Thesis output twice in your admin panel, which could have some unfortunate affects, especially due to the scripting.

In other words, only use this code if you need it. Now you can fully enjoy WordPress 2.7 (well, at least the release candidate version) and Thesis!

28 thoughts on “Thesis on WordPress 2.7”

  1. So, as I am about to purchase Thesis, and with WP 2.7 just around the corner… should I jump into thesis now, or wait until the actual thesis theme is upgraded for 2.7 without a “workaround”?

    Interested to know your thoughts…

    -Doc

  2. Hey, I didn’t know the media uploader worked with Flash10 now. I’m pretty sure it didn’t while we were at WordCamp. I reinstalled my MacBook a little while ago and I can’t tell you the trouble I went to finding the right version of Flash 9 to upgrade to (since my Tiger installation had a much older version and the Flash site only showed 10).

  3. Hi Rick,

    Glad to know a fellow Thesis user is on top of these issues. Thought I had 1.3.2, but just checked and my support person hasn’t upgraded, so I have 1.3.1. And I also need / want to upgrade to WP 2.7.

    Just looking at php, CSS or other coding references makes my head hurt. Do you do (for hire) Thesis support work as a contractor? I could really use some help.

    Feel free to email me with your response. Thanks, Rick.

  4. Brilliant – thanks for this, Rick. Upgraded my test blog to WP2.7 this evening and your code worked like a charm! Just likeTom K. and Marc, above, I can’t seem to get by without that Big Ass Save Button… ;)

  5. Is this the only problem with Thesis on 2.7? I think I’m just going to hold on until Thesis 1.3.3 — I hope Thesis will be fully 2.7 compatible then.

    PS: What font do you use for your blog? I love it!

  6. Ari Herzog: It’ll fix the styling as well as the JavaScript behavior in the panels (such as showing/hiding the appropriate fields when choosing 1/2/3 columns or the type of multimedia box).

    Luis Tovar: This is the only problem with Thesis installing & working correctly, yes. However, Thesis does not (and likely will not until 1.4 or later) support threaded comments, paged comments, or comments in reverse chronological order.

    We’ll find out for sure when Chris gets off vacation and sees WordPress 2.7 for himself. :)

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

the Rick Beckman archive
Scroll to Top