Thesis is a great theme framework, but if you’re anything like me you probably don’t enjoy updating it every time a new version is released.
Luckily, there’s a plugin called PHP Widgetify that makes life a little bit easier.
What is PHP Widgetify?
This plugin adds a new type of widget to your Widgets panel, much like the default Text widget, that allows you to add text, HTML and PHP code. Big deal, right?
Actually it is a big deal. Consider the path to this image in a fictional sidebar:
<img src="http://www.thinkdave.com/wp-content/themes/thesis_17/custom/images/image1.jpg" alt="Just another Image" />
In the image URL you’ll notice the reference to thesis_17, the current Thesis version my site is using. Now suppose Chris Pearson decides to launch Thesis 1.8 next week (to coincide, albeit a bit late, with WordPress 3.0). After updating your theme and delete the old theme files you notice your sidebar images are broken.
To fix the problem you need to manually change all the links in your Widgets panel. When you’ve got 20 images in your sidebar, that’s a tedious job.
PHP Widgetify gives you the option to set and forget your image paths each time you update Thesis by linking to your images using PHP instead of static HTML. Here’s how you could change your image path:
<img src="<?php bloginfo('stylesheet_directory'); ?>/custom/images/image1.jpg" alt="Just another Image" />
Notice that we’ve replaced the reference to thesis_17 with a Bloginfo reference directly to your current Thesis version’s image folder.
Where to find PHP Widgetify
You can download PHP Widgetify directly from the WordPress plugin directory, or install it from within your WordPress dashboard ‘Plugins > Add new‘ area.
Once you’ve activated it, simply drag the PHP Widgetify widget into any sidebar in the ‘Appearance > Widgets‘ area and start adding content.
PHP Widgetify may not seem like much but it does give you one less thing to worry about when you next update Thesis, which will be REALLY SOON, won’t it Chris?
{ 6 comments… read them below or add one }
Why not just remove the version reference from the thesis folder name? That’s what I do.
Does that affect performance?
@Eric, yup, you could do that too, but using the Bloginfo reference helps with more than just images (I migrate a lot of sites). It’s nice to be able to add PHP whenever you want without having to think about it. I don’t even use the Text widget anymore.
@Bob nope, it doesn’t seem to slow things down. But I’m no expert in that area, so I could be wrong (and usually am).
Maybe it’s time I contacted Thesis support and ask if they intend making migration easier with the next version. This is my first use of Thesis and I’m new to WordPress as well.
Not quite sure what you mean by ‘migration’. If you’re referring to migrating e.g a test site to a live site, I think that WordPress is the tool that handles that process. Thesis has the Options manager to download all your options, but posts, pages, categories, links, etc. are all handled by WordPress.
Incidentally, in WordPress 3.0, the import/export tools are different, but I don’t really see much change. Widget support is what we want…
.-= Dave Wilkinson´s last blog ..Actually I DO have an opinion on the Thesis vs WordPress debate =-.
Coooool post! Thanks for shareing!!