Timthumb For MU
Jan 09
Working for a client recently I had to convert a bunch of WordPress themes to MU themes. It is usually a VERY simple task, taking around 10 minutes for each theme, until I looked a these themes. To my surprise they were themes from the very same site as the theme I use ElegantThemes.
I am familiar with how to customize these themes for regularWordPress, but MU isn’t regular WordPress, now is it?
There were only a couple of places where code had to be changed in the actual theme itself (uploadable logo, etc), but then I ran into timthumb.php.
After messing around with Google for about an hour, I decided to go at it on my own, and the file attached at the bottom is the end result.
It supports MU for sub-domains and sub-folders, and is as simple as replacing your timthumb.php file in your theme (well plus another step).
- Modify your timthumb_mu_*php files to use the correct database credentials for your blog.
- Upload timthumb_mu_*.php files to your themes (wordpress-mu/wp-content/themes) directory.
- Modify timthumb to point to the correct version of the timthumb_mu_*.php
- folders is for when you use folders
- subdirectories is for when you use sub directories
- Upload the modified timthumb.php to your theme (wordpress-mu/wp-content/themes/theme_name) directory.
- Test the site obviously
.
That should be all you need to do to get it to work.
Questions or comments, leave them below.
