Update 3rd April 2012: Thesis has multiple custom folder support for WordPress networks built in as of Thesis 1.8.3, so you no longer need the methods in this post.
What’s up with Thesis and WPMU?
Thesis has smart CSS
Thesis by DIYthemes is big news these days so you’ve probably heard of it and have some idea what it does. One of the cool things it does is allow you to specify the widths and arrangement of your content and sidebar columns and it automatically calculates the relative widths (in ems), padding and margins. When it does this it writes to the file layout.css in the Thesis theme directory.
Smart CSS is sometimes not-so-smart
Automatic writing to layout.css is no problem on a single WordPress install, but it can present problems in WPMU: if one Thesis folder is activated on multiple blogs under WPMU each blog can write to layout.css and change the layout for all the other blogs.
Using Thesis as-is
Of course, you can use Thesis with WPMU without any modifications as long as you want it to have the same layout in all the blogs, or you only want to use it on one blog. You can also use Thesis with multiple blogs under WPMU if you give them each their own Thesis folder, but then you have to make sure you activate the right one and make sure no one else activates the wrong one.
One Thesis with multiple custom folders
I use WPMU for testing new designs: it makes it very easy to create new blogs on the fly. To reduce bloat and general confusion I like to work from one Thesis folder. This means that I need distinct layout.css and distinct custom folders for each blog using Thesis in WPMU.
Modify Thesis to use multiple custom folders
This method involves editing core Thesis files, which is usually not recommended. For this reason I have avoided releasing this information to the public. However, I have received multiple requests for this information and have decided to go public with it. Please follow the instructions carefully.
I believe there will be a better, more native, less editing-core-files method to using Thesis with WPMU in the future. If you decide to use this method, please keep that in mind. I.e., it might not be worth initiating this method on a large blog network only to have a better method later and change it all. Check the comments for suggestions on themes that might be easier to use on a large network.
Editing Thesis 1.6
Update 31st March 2010: Instructions are the same for Thesis 1.6 and 1.7 except line 27 is now 29. See comment 107 for a screenshot of the modified functions.php file.
- Edit thesis_16/functions.php
- At line 21, change
define('THESIS_CUSTOM', TEMPLATEPATH . '/custom');
to
define('THESIS_CUSTOM', TEMPLATEPATH . '/custom/' . $blog);
- At line 27 (or 29 for 1.7), change
define('THESIS_CUSTOM_FOLDER', get_bloginfo('template_url') . '/custom');
to
define('THESIS_CUSTOM_FOLDER', get_bloginfo('template_url') . '/custom/' . $blog);
- Between line 10 (the end of the file intro) and 12 (the start of the constant defenitions) add
// Blog nicename
$blog = str_replace( " ","-",get_bloginfo('name') );I added this one last because it will change the line numbers of the above lines, so watch what you’re doing and get it right the first time ๐
- At line 21, change
- Copy the contents of the custom directory to custom/Blog-Name (where “Blog-Name” is the exact name of the blog with spaces replaced by hyphens).
- Make sure the files and folders still have the correct file permissions. I.e., custom/Blog-Name/cache should be 775 and custom/Blog-Name/layout.css should be 666.
That’s all! This will make the custom folder for each of your blogs custom/Blog-Name and layout.css will operate from within that custom folder. The Blog-Name directory is not created automatically. You need to create this folder for each blog with Thesis activated.
If you have any problems with this, please check your site’s source code and see which URLs are referenced for custom.css and layout.css. This should help you diagnose where the problem is occurring and if you have your files in the right place.
Editing Thesis 1.5.1
I’m leaving these instructions because I don’t want to delete and lose them forever, but please use the latest version of Thesis!
- Edit thesis_151/functions.php
- At line 20, change
define('THESIS_CUSTOM', TEMPLATEPATH . '/custom');
to
define('THESIS_CUSTOM', TEMPLATEPATH . '/custom/' . $blog);
- At line 21, change
define('THESIS_ROTATOR', TEMPLATEPATH . '/rotator');
to
define('THESIS_ROTATOR', TEMPLATEPATH . '/rotator/' . $blog);
- At line 26, change
define('THESIS_CUSTOM_FOLDER', get_bloginfo('template_url') . '/custom');
to
define('THESIS_CUSTOM_FOLDER', get_bloginfo('template_url') . '/custom/' . $blog);
- At line 27, change
define('THESIS_ROTATOR_FOLDER', get_bloginfo('template_url') . '/rotator');
to
define('THESIS_ROTATOR_FOLDER', get_bloginfo('template_url') . '/rotator/' . $blog);
- At line 30, change
define('THESIS_LAYOUT_CSS', TEMPLATEPATH . '/layout.css');
to
define('THESIS_LAYOUT_CSS', THESIS_CUSTOM . '/layout.css');
- Between line 10 (the end of the file intro) and 12 (the start of the constant defenitions) add
// Blog nicename
$blog = str_replace( " ","-",get_bloginfo('name') );I added this one last because it will change the line numbers of the above lines, so watch what you’re doing and get it right the first time ๐
- At line 20, change
- Edit thesis_151/lib/classes/head.php
- At line 151, change
'url' => get_bloginfo('template_url') . '/layout.css?' . date('mdy-Gis', $date_modified),
to
'url' => THESIS_CUSTOM_FOLDER . '/layout.css?' . date('mdy-Gis', $date_modified),
- At line 151, change
- Copy the contents of the custom directory and layout.css to custom/Blog-Name (where “Blog-Name” is the exact name of the blog with spaces replaced by hyphens).
- Copy the contents of the rotator directory to rotator/Blog-Name.
- Make sure the files and folders still have the correct file permissions. I.e., custom/Blog-Name/cache should be 775 and custom/Blog-Name/layout.css should be 666.
I consider the installation and managment of WPMU to be for moderate or advanced users, and therefore this tutorial is for moderate–advanced use too. If you’re not comfortable editing PHP, I don’t recommend attempting anything that involves editing core Thesis files (in most circumstances core files should not be edited at all).
Paul says
great post Kris. This ties it all in. Thank you for posting this solution.
Mat Packer says
No wonder you’re a star with Thesis!
Roseli A. Bakar says
Another great solution from the Thesis rockstar. Thanks Kris.
Frank says
Hey Kris,
thanks for sharing this – great stuff.
How about using the blog id for the folders and automatically add them if they don’t already exist? I think i’ll try out to get that done.
Thanks again,
Frank
kristarella says
Hey Frank, it would be convenient if the folders were automatically created. I didn’t invest the time in it because I think there will be another more convenient solution for Thesis + WPMU in the future. If you get it working, let us know though ๐ Using blog ID is fine and easy with get_blog_details, I use names so that I can easily navigate folders on my computer.
Jason Sanders says
I’m pretty new to all of this, but have thesis 1.6b installed on my website. I ran into the same issues with changes affecting all my blogs so I read your instructions and followed them to the “T”.
I ended up getting strange error(s):
รฏยปยฟ
Warning: Cannot modify header information – headers already sent by (output started at /home/thevalue/public_html/wp-content/themes/thesis_16b/functions.php:1) in /home/thevalue/public_html/wp-content/themes/thesis_16b/lib/functions/launch.php on line 96
Warning: Cannot modify header information – headers already sent by (output started at /home/thevalue/public_html/wp-content/themes/thesis_16b/functions.php:1) in /home/thevalue/public_html/wp-includes/pluggable.php on line 865
These errors are across the very top of the page (otherwise the blog looks like it should).
At first I was still able to get into the Admin function because I had been logged in prior to the changes. In experimenting with settings, it looked like the changes had accomplished their desired effect (changing one of the blogs to single column no longer changed them all to single column).
But now, I’m no longer able to access the log in screens on any of the blogs with changes installed. If I undo the changes everything goes back to normal.
Any ideas on what may be causing these errors and the inability to load the log in page? I followed your instructions very carefully and repeated the process several times….each time with the same results.
My main blog is http://www.lovetowatch.us
Sub Blogs:
http://www.ideabox.lovetowatch.us
http://www.mortgagemantra.lovetowatch.us
http://www.south-jersey.lovetowatch.us
kristarella says
Jason — I already responded to the same message on the forum, and not that I mind you commenting here as well, but we might as well use the forum to try to troubleshoot because it’s easier to post code there.
Jason Sanders says
Kristarella – Thanks for your response!
Greg says
We run a large number of Thesis sites sites on MU. Although I do like Thesis, I can tell you that it really isn’t the best choice due to the fact that it isn’t structured as a true parent/child theme which is supported by default in WordPress. In a proper parent/child setup, CSS, images, and custom functions exist outside of the core theme folder. For whatever reason, Chris chose to not use that setup and instead blaze his own trail and place the custom files inside the core theme. For MU users, that means you need to do a lot of hacking to get it to work, and it also means you have to re-hack when there are any major upgrades, which kind of defeats the purpose of using a framework to begin with.
If you are serious about using MU, you have to run everything off of a single core theme because updating hundreds of individual sites just doesn’t scale. To do that efficiently, you would be much better off using a framework that supports the proper use of parent/child themes. (Like Thematic or Hybrid)
kristarella says
Greg — I don’t disagree with you at all that Thesis may not be the best choice if you’re serious about WPMU. I, for one, am not especially serious about WPMU; I use it in my test environment for the convenience of creating blogs on the fly. As mentioned in the post, I wrote this post because I got so many requests for the information.
You sound a little inflammatory here, which I’m not really down with; maybe it’s just the illusive nature of comments and I’ve read you wrong. I think you’ll find that child themes only came about in WordPress 2.7, which was released at the end of 2008. I’m not sure exactly when Thesis came out, but I’m pretty sure I was helping on the Thesis forums in at least August 2008, if not earlier. Chris Pearson was also using the custom.css method of customisation two themes before Thesis in Copyblogger. It seems quite likely that the reason he chose the custom folder method is that child themes didn’t exist when Thesis was hatching. I suppose he could have moved to child themes later, but I think that would’ve taken some rewriting and he obviously chose not to.
All that said, the good news is that in Thesis 1.6b2 layout.css has been moved to the custom folder which means using Thesis with WPMU the way I’ve described takes fewer steps and I will be updating the post to reflect that.
It would be perfectly reasonable for someone to choose a theme/child theme set-up if they want. The main thing those themes didn’t have, last time I looked, that Thesis does have was dashboard control of fonts and sizes and the smart typography calculations that Thesis does. If I were looking into setting up another blog, I would ask myself whether it was less hassle to make the edits to launch.php in Thesis or to calculate all my own column widths and font sizes and line heights etc for every child theme I wanted to make. The answer would be different for different people I suppose and if you like any CSS frameworks you could use them, but as I said in the post, I think Thesis will be more suited to use in WPMU in the future. At the moment, you are right, it’s not ideal.
Greg says
Probably a poor choice of words. I wasn’t intending to be inflammatory. My comment was based on the fact that child themes have actually been an option in WP since the beginning. (The oldest codex page in archive.org is from 04 and it’s mentioned there.) We’ve been using them since 06, and there were others definitely exploring the possibilities before 2.7 so when I said “for whatever reason” I simply meant that I don’t know what the basis for his decision was.
As far as controlling fonts and colors, there are several themes that offer that, but I will agree with you that Chris’ CSS skills are second to none. Committing to a full em based layout is a daunting task, and something no one else has pulled off. (And what personally drew me to Thesis in the first place).
That said, there are plenty of stellar WP sites with quality typography utilizing a CSS grid framework like Blueprint or 960, so I’m not so sure you have to sacrifice one for the other. In the end, it’s about what scales best. And if you are planning to do any type of reasonable volume on MU, Thesis in its current state of development probably isn’t the easiest path.
kristarella says
Greg — Thanks for correcting me on the dates of child themes… I can’t remember when I first heard of them. I saw a post on Lorelle’s blog that seemed to suggest they were new to 2.7, but perhaps they were only coming into common use then, or she didn’t know about them before that. She does say in the comments “child themes are new”, but perhaps she was just wrong, as the web archive link suggests ๐
Glad it was just me misinterpreting the tone of your statement ๐
You make some good points and I’ll try to draw attention to them when I edit the post. I agree that a large scale WPMU project probably doesn’t want to use Thesis if they want different styles on the different blogs, it would be a mammoth task.
shawn says
Just wanted to thank you for the fantastic article. Along with the email you sent me, there was more than enough instructions available for me to ‘hack’ my way into using thesis with wpmu.
In the end, sadly I have to say, I chose to not use thesis for now. In my particular case, I will have hundreds of sites on the server, all using the same framework, but with different layouts. At the moment thesis is not really designed for this.
However, I just got done watching a few interviews with Matt and the other ‘wp guru’s’ and it sounds like we’re maybe on a fast track for wp and wpmu merging. This means for templates like thesis to survive, they will have to adapt and join the collective LOL.
I can say that I have tried many frameworks in the past few months, and without a doubt thesis is the most clean to use. I do look forward to trying thesis again in the future.
btw.
No updates on your site in some time. I miss reading your articles each week. I hope all is well with you and your family. Have a wonderful week.
kristarella says
Shawn — you’re welcome. I just updated the article with the instructions for 1.6 beta 2. It’s getting easier to use Thesis with WPMU now that layout.css is officially in the custom folder. It’s not quite ready for mass use, but I think it’ll be on the way.
Where were those interviews you mentioned?
All is well, hope I can post an update soon-ish. ๐
Steve says
Thanks Kristarella…
As usual your posts on all things Thesis clear things up and help us hone or Thesis chops.
Now what about taking this Thesis/MU integration to the next level?
How about showing us how to adapt Thesis to work with a MU installation with BuddyPress?
They recently changed the way BP uses themes and thee have been several Thesis themes converted to BP however, no one has really shared. The BP camp says its only a matte of copying some template files over from the new default theme… but that has many of us stumped.
Quite a few of us have tried to adapt Thesis to work with BuddyPress to no avail… Do you think you can help us? Thanks in advance.
kristarella says
Steve — I probably won’t be coming out with anything like that in the near future because I’ve never used BuddyPress. If I have a need to dig into BP it’s quite likely I can write a tutorial on it, but I probably won’t get to digging into it just for the sake of a tutorial for several months…
Does BuddyPress use a similar templating system to WordPress, i.e., like described in the WordPress Codex on page templates? Because I can explain how one might add those to Thesis.
Steve says
My understanding is you can now use regular old WordPress compatible themes , But for the BuddyPress plugin components to work, it should be as simple as copying all of the templates from the BuddyPress theme and pasting them into the WordPress theme. Being sure to copy and paste over all of the CSS from the BuddyPress theme also.
In description that sounds simple… in implementation, it’s been a bit tricky for some of us to get this to work, while those who have done this specifically with Thesis haven’t been willing to share much.
Basically the new theme structure uses a parent-child theme setup. I would assume that they do use a similar setup to the codex, but I am not entirely sure enough to say for definite. If that is the case, then yes, that would be very helpful.
Here’s a link to the BP Codex, if it helps- http://codex.buddypress.org/
rumblepup says
Dood, I was going NUTZO until I found this. THANK YOU LADY K!!!
Only one question though. You said,
“Copy the contents of the custom directory to custom/Blog-Name (where โBlog-Nameโ is the exact name of the blog with spaces replaced by hyphens).”
Do you mean the URL of the blog? For Instance, if I have news.mysite.com, do I name the folder custom/news or do I name the folder the Title of the site, like custom/New-In-My-City?
kristarella says
Rumblepup — It is the name or title of the site, not the URL. Trying to extract just the subdomain or subdirectory bit of the blog seems to be a bit more complicated.
Dixie Teo says
Hello kristarell,
I am a new comer in terms of web design, I am so glad you actually started this topic. While there is a lot of discussions about thesis with WP, there is very few with WPMU. I have encounter problems when I tried to added page with the thesis. I use the WPMU admin to add the page and then click on the NAV. While it shows, the content is always empty.
I wonder too if you are family with buddy press? I would also like to ask if there is a way for me to place buddy press pages on to thesis page? How I could customised my content to be place on the pages?
By the way I am using thesis 1.5.1, WPMU 2.8.4 and buddy press 1.1
Hope you would be able to help Thanks
kristarella says
Dixie — I haven’t experienced any problems with WPMU + Thesis like what you’re describing (although I’m not 100% sure what you are describing). For most purposes Thesis behaves like any other theme with WPMU in its behaviour, except for the CSS issues I mentioned at the start of the post.
As I mentioned a few comments ago, I don’t have any experience with BuddyPress at all. I’m sure that Thesis & BuddyPress can be integrated together, but I haven’t had a chance to check out the BuddyPress theming system to see what it involves. I had a look at the Codex that Steve linked to above, but without experimenting I can’t tell you how it would be done. It might involve hooking into the custom template hook in Thesis, or making an extra template file in the Thesis folder, or something else.
rumblepup says
@kristarella – Yep, got it on my own just tweaking. Only problem with 1.6 is that you’re almost forced to design online.
kristarella says
rumblepup — How do you mean? 1.6 seems to fit into my workflow the same as the other versions have. I do need to make a new CSS reset template though.
kristarella says
For those interested in BuddyPress integration. What is it that you are primarily trying to achieve by integrating the two? As far as I can see, BuddyPress comprises a plugin and a theme. The BuddyPress theme is a theme with certain pages and widgetised areas. You are completely free to use Thesis and add the widgets to the sidebars in Thesis or create new widgetised areas. However, I think you lost some javascript functionality by not using the BuddyPress theme.
It looks like it would be a big task to convert the BuddyPress theme to Thesis, or to any other theme for that matter. You would need to go through the BuddyPress theme files one by one and get the bits you want and change the markup to suit the theme you want to use. Unfortunately the child theme system uses the BuddyPress theme as a parent and then your child theme can override the CSS or certain theme files of the BuddyPress theme, but you wouldn’t use the BuddyPress theme as a child theme for Thesis because it would override huge amounts of Thesis.
It is possible to use BuddyPress and Thesis, but it would be very arduous (it would be arduous to convert the BuddyPress theme to any other theme) and you’d want to be clear on why you wanted to.
A slightly less arduous, but kind of hacky method would be to create the design you want in Thesis (using the Page Framework) and copy the CSS into a file and use that as a child theme for BuddyPress. You might need to change a few ID and class names, but it might get close. However you would be dropping a good chunk of what makes Thesis Thesis (flexibility, good markup, in-post options etc).
Dixie Teo says
kristarella
Thanks for the quick respond. I have viewed your video and guess what, I managed to solved the issue when I use full page layout.
As for buddypress I think their themes are too basis and similar, I am testing some plugins to see if I would be able to place widgets on the page. Anyway thanks for your help.
Steve says
Interesting…
I followed the instructions above for Thesis 1.6b with the final release of 1.6.
Even though I properly reset permissions, on the main site and the subdomained blogs using the custom/(blog-name) setup, it says that my permissions need to be reset for layout to 666… which they already are.
Using the non mu-modified version of Thesis 1.6, everything is fine.
kristarella says
Steve — As per the note in the post:
If you’ve changed the permissions and it still has that message it might not be detecting the correct location of layout.css in the new Blog-Name folder. Check the URL of the CSS files in the head of the blog and see if that’s where the files actually are (by copying and pasting in the address bar of your browser, it should display the files). Or you could make a change to the design options and see if it gets written to layout.css and shown on the site.
I think I might have gotten that message when using this method on previous versions of Thesis when layout.css didn’t live in the custom folder normally. It didn’t stop it from working.
Steve says
Kristarella,
The source in the header doesn’t seem to be finding the layout.css and custom.css files…
Only styles.css and ie.css
This makes sense in the respect that there happens to be no layout or styling shown.
When running the non-modified version, everything works OK, and of course the source displays all the proper css files.
Also changes to design options don’t seem to do anything.
Perhaps I am misunderstanding a step here.
Currently the main blog: http://nlfxprofessional.com is running on 1.6 stock, and the subdomain http://denondj.nlfxprofessional.com is running the modified 1.6 setup with the custom/blog-name setup. I tried 2 versions to see if it helped, which it didn’t… /denondj which is the subdomain and /denon-dj which is the blog title.
The same exact behavior occurred on the main blog when using the modified 1.6 theme instead of the stock install.
kristarella says
Steve — The folder name needs to be exactly the blog name with space substituted to hyphens, including capital letters. It looks like yours should be custom/Denon-DJ.
Steve says
Ah ha…. OK gave that a try. It worked for the sub blogs. It didn’t work for the main, so I assumed the same would apply NLfx-Profesional… and it worked.
I originally misunderstood what you meant. To clarify for others, you use the name as per your WordPress general settings with cap sensitivity and hyphens for spaces.
Thank You so much for this fix and for your assistance! You are truly a WP & Thesis ninja, Kristarella!
Steve says
Thanks again, Kristarella for all your help….
Here is more information on BuddyPress Theming that someone gave to me:
“Buddpress-ifing” existing WP themes.
Take a copy of the folders from the bp parent theme, dump them in the WP theme. Do the same with the userbar.php & optionsbar.php. Add @import url( _inc/css/adminbar.css );
@import url( _inc/css/screen.css ); to the WP theme’s css file.
Any idea on how would this apply with Thesis? I am sure things might be a bit different… especially with the MU hack. I’ve experimented, so far without any success. The Widget-based stuff works, but the deeper BP features still don’t work.
Thanks Again for any assistance with this…
Dixie Vogel says
kristarella-Thank you very much for this helpful tutorial. Exactly what I was looking for today!
Just an addition – I opted to use the domain in place of the blog name as suggested because the blog names are too easy to change and break the customization path, plus a special character in the blog name was giving me problems. I thought about using the blog id, but opted for the domain much for the same reason you used the name in the first place – much easier to identify what blog you’re looking at when in the custom folder.
So that edit around line 10 becomes this: $blog = get_blog_details(‘domain’);
And you name your folder inside the custom folder this way – blogdomain.wpmudomain.tld
Note to others – This is applicable to subdomain setup, even with domain mapping. You can verify the domain name in the wp_blogs table.
Hope that helps somebody! ๐
Jonas says
Well I’m awfully glad I found this too, since I’ve been wracking my brain about how to get WP, Buddypress, and Thesis to play nicely with one another. I want to do this for the same reason that I suspect a number of others do: to have my main thesis blog as the front page but to also have the ability to make the site into a more robust CMS with social elements. I can’t vouch for the inner workings but for those who are trying to build a community around a niche area, not being able to include social elements (groups, forums, profiles, status feeds, etc…) is really going to leave us in the dust. Maybe we’re not quite there yet but not too far down the road it’ll be mission critical if you want to use Thesis as a CMS and not just a standalone blog. I’m not sure that I even want to include other blogs on my site, but I certainly want the social element, and it seems as though you can’t get the latter without bringing in the former. It seems that for the time being I’m stuck.
Like many, I love the customization that Thesis allows. I came into this with no coding experience whatsoever, and have managed to learn a great deal since I jumped on board. And now, looking back at a number of other themes where you essentially just select things from dropdown menus and have no ability to code in changes, it seems completely ludicrous why one would do that.
Anyway, I’m glad I found this and I hope that this convergence of functions is coming soon. It would be enormously helpful!
kristarella says
Dixie — Thanks! That’s really useful. I’m sure I’ll put it to use!
Steve — That does give me another idea for how you could approach integrating them. I can’t tackle it today because my internet is far to slow today, but I’ll see what I can do on the weekend.
Jonas — Thanks for your input! It makes a bit more sense now why you’d need to integrate them. It’s kind of a shame that the theming system for BuddyPress has changed to be the same theme use on the whole blog because there is such massive modifications required to integrate all the fancy stuff into another regular theme. It would have been easier to fudge the BuddyPress theme to look the same as the theme on your blog, but now they have to be one… Hopefully we’ll find a relatively simple way to do it.
Raw Data says
I’m doing the same thing right now, trying to use Thesis with MU and Buddypress, haha, getting kinda picky aren’t I?
Any thing further on this? I may just bow my head and go witht he buddypress theme
kristarella says
Raw Data — Sorry, haven’t had time to test theme integration any further. Probably simplest to go with the BuddyPress theme until something further happens on this front, unless the time it’ll take you to customise that theme is worth the time experimenting with Thesis integration, which is possible.
Dixie Vogel says
Update – I discovered a problem with the code I gave in comment 33. Should be this –
$blog_id = $current_blog->blog_id; $blog = get_blog_details( $blog_id )->domain;
The get_blog_details function requires the blog_id parameter; so we need to pull the id first to tell the function what blog we’re wanting to reference to pull the domain. Sorry for the confusion. I THOUGHT is was working before but didn’t test adequately…
Bryan See says
Dixie,
Thank you so, so much for your suggestion on comment 37.
kristarella says
Dixie — Thanks for the correction! Is there a misplaced parenthesis there? I think it should probably be:
Dixie Vogel says
Kristarella – I’m way not a coder, so I copied an example from the codex.
from http://codex.wordpress.org/WPM.....og_details
kristarella says
Dixie — Oh, bizarre. That use of parentheses just seems wrong to me, but if that’s what it says and it works then who am I to argue? ๐
Umair Abbasi says
I ran into a bit of a problem running this method. First off let me say thank you so much for posting this method. I have been using it without a glitch since the idea was posted.
This morning I started reading on trademarks and copyrights and thought what a great idea it would be to insert the โข symbol next the my blog title. Unfortunately when I can the โข to the title it obviously can’t find the folder name without the โข symbol.
I am going to mess with the site using Dixie’s method instead since it doesn’t involve using the blog title unless Kristarella you have another magic solution up your sleeves? Thanks.
Dixie Vogel says
@Umair – I think you can do it with the blog title but you’ll have to use encoding in the folder name, judging from what I saw when poking around in the database. However, because the blog name is so easy to change from the admin and that would break the customization path, I personally opted to use the variation domain for that reason. However, I’d never have gotten that far without K’s fine tutorial here.
@kristarella – That made me feel a little better – there is finally an advantage to not knowing much about coding! I wouldn’t know if it looked weird. So I guess it gives me the Zen mind. ๐
kristarella says
Umair — I definitely think you should try Dixie’s method and avoid using funky characters in any URLs and directory paths.
Dixie — Thanks for your response to Umair, has been pretty crazy here and without internet connection for much of the time.
Ed says
it’s not working when I changed the code in fnctions.php. So I just created a new folder as you suggested and it’s the only thing I did. It works! Why it just works without changing the code?
kristarella says
Ed — I have no idea, I don’t really have enough info to even speculate.
Michelle says
For everyone asking about integrating Thesis and BuddyPress, Detective over on the BuddyPress forums has done it – you can download his “Genealogies” theme from the link here: http://buddypress.org/forums/t.....ith-thesis
Once you’ve installed per his instructions and activated Genealogies, you’ll see the good old Thesis menu with all its options, and they’ll apply to the theme. I’ve just barely begun to play with this, but it looks great so far! ๐
kristarella says
Michelle — Thanks for the info! Very helpful. I always thought it was possible to integrate them, just bloody hard work ๐
Steve says
Thanks Michelle.
The only problem is, it looks like Detective isn’t going to do anything further with it. With the merge coming soon, I am concerned. I tried installing BP-Genealogies on a wp 2.9.1 install running bp 2.1 Beta and there is an error right off the bat. I don’t know if it will be able to work after the merge. Or at least on a single instance of WP.
Has anyone else had this issue? a work around?
Kristarella, will your Thesis with MU tutorial be applicable after the merge? Will it be necessary? Any thoughts?
Michelle says
Steve, I haven’t tried it with BP 2.1 beta yet, though I have with 1.1.3 and have no issues there. (I haven’t even delved into what Detective did to make this work – I just took it and ran. )
No word on Detective’s continuing involvement with this, but I am encouraged that he’s done a lot of the heavy lifting. Hopefully when the merge comes he’ll help make updates, and/or we’ll be able to go in and leverage his code to make Thesis work with WP/MU and BP. I’ll certainly give it a shot. I know too much about Thesis now to want to give it up!
Seems like quite a few plugins are going to need updating at that time, including the Thesis Import/Export plugin, which already isn’t working as expected with MU. Interesting times… ๐
Jonas says
Hi Guys —
I talked with Detective a while ago about this and he was pretty helpful. He’s running a site or two with this but I think he has a new job or something which might limit his ability to really be involved with this going forward (obviously I shouldn’t speak for him, but that’s the sense I got). At any rate, I’m no Thesis-ninja, but I do think that folks interested in this will have to put our heads together to move the process forward. I don’t know what the official Thesis folks have in mind, but I’d have to think that they have something in the cards vis-a-vis the WPMU merge…
Steve says
Yeah the thing is. It doesn’t currently work with BuddyPress on WordPress Single.
Detective basically said that because of the new job he wouldn’t be continuing work on the child theme.
As much as I am willing to create a custom theme from one of the defaults, after using Thesis, it is hard to give it up. I haven’t come across a single project that I want to design with anything else. That’s why I really want this to work for BP. I have been sitting on 2 BP projects since before BP hit 1.0. Always holding off because the way themes are done have changed or holding out for a solution for Thesis.
I would hate to go Thesis plus Genealogies on a WPMU site (that I don’t need Multi-site functionality on) only to have it possibly not work after the merge.
I hope that someone will take Detective’s heavy lifting and move forward. BuddyPress now works on WP 2.9.1 using the 2.1 Beta. It could be something fairly simple to get it to work, but that is out of my skill set.
Honestly, from what I am hearing the merge won’t change too much for MU users or Single users (as long as they aren’t changing from one to the other – I could be misinformed.) So I think the issue is that Genealogies was designed to work with MU (but as a single instance) which with the merge is inefficient. What we need is to
1. Get it to work with Single WordPress 2.9.1 and BP 2.1 Beta… Then
2. Get it to work with Multi-Site WordPress after the merge.
Then the Thesis world would be our Oyster so to speak.
I would hope the official Thesis folks would want Thesis to be BP ready when BP works on Single WP.
Honestly, it would be wise for them to take the project up, make it work, and bundle it with Thesis. But who knows what they’re intentions or views on this are. I just think it would be smart business, to help extend Thesis to the throngs of BP sites that will pop up post merge.
Thanks everyone!
Steve says
I have a 2 test installs.
1. WP 2.9.1 and BP 1.2 Beta – Genealogies Didn’t work. Got errors.
2. WPMU and BP 1.1.3 – Genealogies worked fine.
Then I upgraded the WPMU to BP 1.2 Beta and Genealogies wasn’t seen as a BP theme.
I then noticed it didn’t find the new default either. I had to transfer the new BP themes from the Plugins folder to the themes folder (like on older WPMU installs) Now Genealogies works.
The WP installation finds the BP themes in the plugins folder (it is recommended to keep them there.) Everything works fine except Genealogies. The issue has to be there.
Steve says
Eureka!
I relocated the new BP themes into the themes folder and Genealogies started working in WP Single on BP 1.2 Beta!
So, either we are going to have to keep continuing the move over of BP themes when they get updated, or modify Genealogies to find the themes in /plugins/buddypress/bp-themes
Steve says
I may have spoke too soon.
Genealogies works, per se. But it is still not recognized as a BP compatible theme. Bummer.
Still having trouble with the error on the other installation, although for some reason (same files) it was able to work on the test install.
kristarella says
Hi all, I hear you regarding your desire to get these two working. I understand the appeal now and it’s a worthy project. I’m delving into it now. I can’t promise anything, but I just wanted to let you know that I’ve installed BP and downloaded Genealogies and I’ll see how Detective has done it. I had some ideas for how it could be done too… So, no reportable progress yet, just wanted to let you know that I’m checking it out right now, so I’d be interested to hear if you make progress and I’ll let you know if I do.
Steve says
Thanks Kristarella.
I am sure it is probably something fairly easy since they were working with WPMU & BP 1.1.3
Just now, 1.2 is the future direction and with the merge and the fact that BP works with single WP now, I think we are on the ground floor of a BP/WP explosion.
Thanks for looking into this and any effort you put in. You definitely rock!
Thanks!
kristarella says
Steve — Not sure which part you were referring to that might be fairly easy. In terms of integrating Thesis and BuddyPress to work properly together, it’s quite difficult! I’ve spent a good part of my evening looking at it and I think Genealogies is the winner. It’s at least an excellent starting point. At this point I believe the way he’s gone about it is the only way to do it, i.e., making a child theme of Thesis with the BuddyPress files in it. To run the BP pages like /members/ and /groups/ etc you need to have those folders in the main theme folder, there is no way (that I can see) to redirect them to another folder.
I was hoping to have those folders inside the Thesis custom folder, making it easier to perhaps use them as custom templates rather than the way they are used now, but it’s not possible without editing the references to them in the core BP files, they’re hardcoded as theme-folder/directories/blogs or whatever.
In terms of using Genealogies, I haven’t had any errors, it works fine from wp-content/themes with WP2.9.1 and BP 2.1beta.
I’m not sure that the members pages and groups pages are actually working with it though, I just get redirected to the home page.
I was thinking some custom functions to enhance the nav would be good, e.g.,
I sort of think that BuddyPress is pushing WP theming backwards because the child theme relationship only really works one way without an inordinate amount of work. It’s easy to make a child theme of the BuddyPress themes to make it look the way you want, but without recoding every template you’re forced to use their HTML. If you want to use Thesis functionality, but add in BuddyPress stuff you have to make a child theme of Thesis, but then you still need to copy half of the BuddyPress theme over and recode the templates. It probably would have been simpler to leave it with a segregated blog and BuddyPress theme, then you could at least half use the theme you wanted…
Anywho, I’m happy to help build on Genealogies if there’s particular issues to work on, but I’m not sure what they are since I don’t use BP myself. Perhaps we could start a Thesis forum thread about it, might be more efficient than using the comments of this post?
Steve says
Thanks Kristarella,
I would agree with your assessment about BP taking WP theming backwards a few steps.
What I meant by fairly easy is that Genealogies already works with BP 1.1.3
(I’m assuming) It should be fairly easy to find the differences between 1.2 and 1.1.3 and implement them into Genealogies.
In my tests, Genealogies works under BP 1.2 as a regular theme, however, BP 1.2 Beta does not recognize Genealogies as a Buddy Press compatible theme, which basically cripples it.
I do think a thread on the Thesis forum would probably work better at this point. In the past, it didn’t get much attention., but now should command more. Perhaps we can draw the attention of Detective, as well as many other Thesis ninjas and pull all our heads together. Perhaps we can even see if Andy Peatling would add his input there, as well.
Now to keep to the WPMU theme of the post, do you think that the technique for using Thesis with MU will be necessary for Multisite after the merge? Do you think it will still work? Thanks for everything!
Steve says
Oh and I love the enhanced Nav idea!
kristarella says
Steve — Ah, see what you mean about the BP compatibility, yeah, hopefully we can do that.
When I read the post about WPMU becoming WPMS I was under the impression that we would still need to edit Thesis slightly. The same technique should work, but maybe it’ll be slightly changed depending on what other changes are made to the management of WPMS. I’m hoping that eventually we won’t have to change anything in Thesis to use with MU/MS. For example if some sort of skinning system is implemented where you can keep multiple skins in your custom folder and activate them, then you wouldn’t need to edit the functions.php file.
Steve says
Thanks Kristarella.
Detective started a thread on the Thesis forums that I hopped into, to try to stir the discussion over there about this issue. Here’s the link: http://diythemes.com/forums/cl.....post104011
Hopefully someone will be able to get to the bottom of this, as it looks like tomorrow we will see BP 1.2 RC
Also, thanks for bringing the theming issues with BP and frameworks to Andy’s attention on Twitter.
aj says
Worked like a champ. Thanks for the code snippets and the clear steps.
aj says
Follow up to Dixie’s post 37 –
this worked for me but my folder names had to be lowercase (domain.com) . I am using Donncha’s mapping plugin but I had to use (subdomain.domain.com) folder names for my additional blogs
John Sexton says
Hi Kristarella, I just wanted to drop by and thank you for this tutorial.
I’ve recently set up a WPMU server so I can easily demo client sites, and your instructions helped me set Thesis up correctly with MU.
One thing that tripped me up for a minute was requiring the capital letters in the blog-specific custom subfolders. Without those, no style or layout was loaded for any blog on the MU install, and things were looking pretty heinous! But after carefully re-reading the comments I found the solution.
I wonder how, if at all, things are going to change with both the MU merge and Thesis 1.7 on the horizon?
I’m confident that Chris is taking the merge into account.
Thanks again, this was a huge help!
kristarella says
John — Glad you got it worked out! I taked about my thoughts a bit in comment 61 on the WPMU->WPMS change. I’m unclear how the move to MS (an announcement here, I can’t find the original one I saw on an official WP blog) is the same or different to merging with WP. In terms of Thesis, I think if you need different layout.css and custom files for different sites and want to use the same Thesis folder you’ll still need to make changes like the ones above. I believe that eventually there’ll be a skinning system in Thesis that will mean we don’t need to make changes and can just use skins on different sites, but I’m not sure that will be available in 1.7, although the integrated options export in 1.7 will certainly make development and multi-site deployment easier.
Steve says
Thanks again for your help on the BP/Thesis front. We are now officially at BP 1.2 final release.
So far there has been no progress on this front, but the thread I linked above (in #62) is a start.
Steve says
Update on the BuddyPress with Thesis front:
We got Genealogies to get recognized as a BuddyPress theme… Everyone is going to kick themself… Just like I did!
Detective posted this:
To make the theme recognizable by BuddyPress you need to edit the style.css and add this:
Tags: buddypress
I just tested it with 1.2. It seems to work, however, you don’t have access to the new activity stream features. Maybe I’ll update the theme sometime.
YEAH THAT SIMPLE…. DOAH!
He then followed with this:
I’ve just adapted genealogies to the new bp template pack. It works BUT it has no styling, so it doesn’t look good. I’ll try to update the code in bitbucket this weekend.
kristarella says
Steve — zOMG, that easy huh? I seem to remember reading that in my investigations, but must have just assumed that was already in there or something. My brain may have been fried at that point! A step closer!
Jonas says
So I think I’ve been able to get some basic buddypress functionality by just installing the regular buddypress plugin along with the buddypress template pack plugin. I get the buddypress bar to show up at the top of the screen (which has tabs for groups, profiles, etc., etc.), but when I click on those the styling is still kaput. I just get a basic grey screen, though the profile text is there and gravatar.
It would seem that this is just an issue of styling now — how to get the buddypress functions to fit within the Thesis style framework. Alas, I’m afraid that I’m probably in a little over my head here since I don’t really have a solid grasp of how Thesis works on the back end, but surely this isn’t an insurmountable thing?
kristarella says
Jonas — It’s not insurmountable, just time consuming. There is a lot of PHP that needs to be taken out of the default BP theme and integrated with Thesis’ architecture. Steve has made more progress on it in his comments above. Personally, I would wait for WordPress 3.0 before spending a great deal of time on it because I don’t know how the WP-WPMU merge is going to play out and affect theming.
Jonas says
Good tip Kristarella — I am indeed excited about the merge. It’s got to be around the corner I would guess?
I was sort of wondering about the radio silence from the Thesis folks on buddypress integration, but in light of this it might make more sense on their end just to wait for the merge and then go from there.
Steve says
So, what if you want to use the same layout and css throughout most of the mu install but with only minor changes to the other “sites” contained therein?
It doesn’t seem worth doing multiple custom folders and repeating yourself in that case. On a recent project, I am using mu to create subdomains that act as subsections. What I would like to do is maybe use slightly different header code in each “section” or “site” and maybe change the content and the css for the sidebars slightly. Otherwise it will be all the same layout and mostly the same css.
How would I go about doing something like that more efficiently without copying everything into the multiple folders repetitively with only minor css changes? I assume it has something to do with custom functions and blog ids. I just am not sure how to implement it.
Thanks as always!
kristarella says
Steve — If it’s just the header and sidebar content that will be different you could widgetize the header and insert the header contents into a widget. Then it’ll be saved in the blog’s database rather than the custom folder. You could also use the header scripts box to add a bit of CSS in the head of an individual blog (wouldn’t want to do it a lot, but a couple of lines should be fine).
Steve says
Thanks. I’m not entirely sure where it will go. I start with a loose design then I kind of let some of my designs take on a life of their own on route to completion… LOL
I like widgetized header… I should have though of that. Although I am thinking of also including a slider in the header for each section.
It’s not necessarily just the “content” of the sidebar but the css in that area.
One of the things I did for the design impacted the css of the “content area” and the “sidebars” and would like the ability to change this from “section to section.” Is there a way to do this in custom functions with the blog id vs. doing all that in custom folders? (ie. the min-height based on the content or sidebars in that “section”.) Or is it just best to duplicate it all and make the minor css changes in the custom folders.
Thanks.
kristarella says
Steve — You could use the
$blog
variable in the post to add the name of the site as a body class instead of creating a custom folder and then add your changes to the one custom.css using the different body class for each blog. For example,Or if you prefer you could use the blog’s ID or subdomain (you would probably need to get the whole domain and strip the domain and tld so there are no periods in the class).
Steve says
Wow,
That’s an interesting approach. I just added the code and started top experiment and it seems to be doing just what I need it to do. Now this also possibly leads into my navigation issue as related to mu. I’m not sure whether this should be here or in the nav thread, but it kind of deals with nav in mu on thesis specifically.
I’m using the Thesis default nav. I also have a global nav that represents each different “site” above it. Whenever I am in a different “site”, the default nav takes over for that site (underneath) and it highlights the appropriate “global nav” item (up top).
The problem is when it pertains to the “blog”. I can get posts from the blog for that “site” to highlight properly by adding a css class to the post in Thesis, however I cannot get the “blog” itself for that “site” to highlight the appropriate “global nav” item. The only thing I was able to do previously is get a “blog” to highlight all “site” front pages simultaneously, instead of the one it belongs to.
I’d provide a link, but I have to shut down the global nav during daytime hours so no one accesses the unfinished sections of the site. If you don’t understand what I am trying to say, I can include a screenshot. I had no success in the Thesis forums with this because it is seen as an mu issue.
Thanks Again.
kristarella says
Steve — A screenshot might help, but what I think you’re saying is that you have a MU sites nav and then a thesis site/blog nav below it. The Thesis nav highlights as normal, but the MU sites nav is not highlighting the current site/blog?
If that’s the case it seems to be neither Thesis nor MU specific, but a PHP issue. Have you written the global nav or is it generated by a plugin?
There are a number of ways to go about this: PHP possibly using the domain thing and maybe the $_SERVER global variable, or if you don’t have access to the PHP, or can’t go very in depth with it because it’s a WordPress function listing the sites then you could try javascript with PHP and say
if ( == NAV ITEM NAME) $("#global_nav li").addClass('current');
: for that you would need a bit of jQuery (or your preferred flavour) to detect the contents of the nav item to see if it’s the same as the current blog name… That’s not all there is to it, but hopefully if you’re a bit familiar with javascript you get the gist of where I’m going with that.Steve says
I wrote the MU nav in custom functions. Basically a hard-coded ul with a few css classes and ids.
A screenshot is linked above in the “website” section of the comment form. Perhaps it will explain clearer what I am looking to do.
You’ll notice in this example that the “weddings” subdomain is highlighted as a tab in the MU nav and the weddings page are shown in the thesis nav. In this example, “Webcast” is the blog for the “Weddings” subdomain. When I click on “Webcast” it no longer highlights the “Weddings” tab. The same is true for whatever the blog is for each subdomain. The individual post pages are fine if I assign them a CSS Class in Thesis although it’s a bit clunky having to rememebr to assign the same class to every post, but it works.
I just can’t do that with the page that displays all the “blog” posts itself.
The one suggestion I ended up trying from the Thesis forums made every “blog” highlight every “front page”. and things were hardcoded to react to a specific number tab, which wasn’t going to work in the case I needed. The concept of mu was throwing them off a bit.
Thanks again, I’ll give the code a try.
kristarella says
Steve if you go the route of assigning a body class for each blog then you can make a CSS statement to always have that tab highlighted on the blog. Otherwise I would use:
And replace your tab classes with
$classes
.I haven’t tested that method for getting the blog domain, but I think it should wind up the same as the http_host.
Jason Sanders says
Any ideas if the mods laid out will be effective with integrating thesis 1.7 with WPMU?
Jason Sanders says
Sorry, I just saw that instruction are the same, except for the line changes. Whoops. Thanks so much for your help Kristarella!
Haroun Kola says
I’m new to the boat of integrating my happily beautiful Thesis themed blog into a BuddyPress site. Would the esteemed people expanding this thread recommend that I hold off trying to get mine to work until 3.0, which seems imminent seeing that the beta is available or muddy the waters by trying out the Genealogies approach?
Anyway, I’ll subscribe to the post to keep abreast of happenings on this topic. Thanks for the blog post Kristarella ๐
Paul says
I’m running this solution on a Thesis install with 19 separately designed blogs. It works a treat, thanks again.
My question relates to the process involved in changing the custom folder name / blog names to also reflect a change in the ‘My Blogs’ list in the BP Admin bar.
I’ve been using ‘Site-name—blog-name’ for all of my blogs, but its becoming overkill using the Sitename on each. If I change both the folder name on the server and the blog name in mu the blog is still displayed correctly, but do you know what to do to see those changes reflected in the my-blogs.php list?
thanks
Dvon says
I’d like to bang my head through the monitor..grrr. Kristarella, I’ve learned a lot from you and my thanks go out to you ๐ , But I’ve been away from Thesis for awhile and now I forget a lot. I’ve successfully done the above process with 1.6 but now with the new 1.7 I’m having problems. I have done a complete reinstall of everything 3 times, followed directions, and was sure to observe the new line changes but I’m stuck.
my sub blog of http://fortmyers.localcitylive.com looks fine, but the main blog installed in the root is giving me warnings and not showing the theme. I have tried to follow the paths that are given, but I don’t see whats wrong.
I’m just upset that I’ve done this a few times in the past with this very tutorial and now I can’t. Can you help or lead me in the right direction please…
Any help is appreciated in advance.
main site: http://localcitylive.com
sub: fortmyers.localcitylive.com
Dvon says
Forget my previous comment!!! Yea!!!! ๐ I did not realize that I also had to create a new folder for the main site blog. I guess it didn’t seem very clear to me from the directions, my bad. But still may thanks for the great lessons.
kristarella says
Paul — Sorry for the delay in my reply. I don’t use the admin bar in WPMU and I’m not sure how it gathers the information. I also can’t find the related files in my WPMU install, so I can’t really check it. The only thing I can think of at the moment is to double check the blog name under Site Admin > Blogs > Edit (link under each blog name).
Paul says
Thanks. After changing the Blog Names in Site Admin > Blogs > Edit there is no change to the ‘My Blogs’ menu. Hoping someone else has an idea on this.
thanks anyway.
kristarella says
Paul — I just went through my WPMU databases and that particular option was the only one I could find that stores the blog name, so I’m not sure what the menu is doing. Might be a question for the WPMU support forums because I don’t think Thesis or these modifications relate to it.
Paul says
thanks a lot for checking it out…
Mitch says
Hi,
I have Thesis 1.7 and am running WP3.0 as a subdomain install.
Lots of individual blogs for our company.
I was so hopeful that 1.7’s export settings feature would work to quickly customize the basics of all the blogs and then do minor edits on each.
Before I go thru the nightmare of changing the code as you have so kindly provided. Will it work with subdomains and WP3.0?
Thanks
kristarella says
Mitch — I haven’t tried WP 3.0rc1 yet, but from what I’ve read about it so far, I see no reason why this technique wouldn’t work with it.
Mitch says
Awesome.
Of course, Thesis 2.0 will come out in the fall and solve this ๐
K, that’s just me being hopeful!
Wish me luck.
I’ll let you know if it works:-)
Mitch says
*sigh*
Attention! In order to edit your custom files, youโll need to change the name of your custom-sample folder to custom.
kristarella says
Mitch — Yep, you still need to install Thesis according to the regular install instructions. I would recommend getting it going on your main site first and then fussing about with the modifications.
Hopefully 2.0 will include some multi-site support, whether it be in a form similar to what I’m doing, or a general skin manager allowing you to apply different skins via the options panel. No idea when 2.0 might be coming out (I don’t think even the author knows that yet).
Mitch says
A perfectly tight install – working like a charm.
Now, is VERY unhappy.
Back to the drawing board.
aj martin says
I have Thesis 1.7 working on WP 3.0xxxxx multi-site. I am using Domain Mapping plugin
The gotcha for me was to make sure I named each custom folder the EXACT domain name including the TLD
so my folder names are domainname1.com and domainname2.com etc
AJ Martin says
so you may need to rename your folders with the subdomain names like subdomain.domainname.com or whatever – quite sure the problem is coming from a mismatch in the code where you tell it to look for the folder
$blog_id = $current_blog->blog_id; $blog = get_blog_details( $blog_id )->domain;
you can always echo the $blog_id to see what it is
aj martin says
Also found this link regarding a fix for a known error with Thesis 1.7 and WordPress 3.0 RC
http://thesislab.net/archives/.....press-3-0/
Mitch says
Really appreciate all of your help.
I am so not a coder!
I’m guessing the “need to set permissions” error message is because it can’t find the files.
All the files have the proper permissions on them so I have ruled that out.
I think you are correct – that it can’t figure out the folder.
I have tried corporate.website.com and that doesn’t work
I have tried site name only “corporate” and that doesn’t work.
Sorry to be a bother but although I like your idea of echo’ing to find the actual blog ID, I actually don’t know how to do it or where to put the code so that the info shows itself to me.
I need to get this working today for my client.
Any help you can provide is greatly appreciated.
Mitch
aj martin says
Are you on skype? Drop by http://AtlantaWebmaster.com and drop me your contact information and perhaps we can real time this
kristarella says
Thanks for your comments AJ!
Mitch — When using the code in the post, you need to use the exact name of the blog with the spaces replaced by hyphens. So, presumably your site name would have a capital letter and be “Corporate”, rather than “corporate”.
If you want to use the domain, you need to use the code in Dixie’s comment, which replaces the last line of code in the tutorial.
Note: it wasn’t obvious to everyone from the tutorial that you need to create a folder inside the custom folder for the custom files of the main site as well as all the sub-sites.
I just followed the steps of this tutorial for a brand new install of WP 3.0rc1 & Thesis 1.7 and it worked (using the site name, I didn’t try the domains). So, it does work, but perhaps something has gotten muddled for you along the way.
If you end up consulting with AJ on this, hope that goes well. I’m about to go to sleep, but can help more when I wake if needed.
John Sexton says
Hi everyone,
I have a working dev server running Thesis 1.7 and WP 3.0 b2.
This method does work as stated, but as people have said, you must get the blog name exactly right.
For example the path to custom.css on My Blog becomes
thesis_17/custom/My-Blog/custom.css
I am thinking about putting together a step by step tutorial with pictures for setting up this environment – wp3 with Thesis 1.7. – from scratch.
It wouldn’t necessarily present much new over what Kris already has here, but it might be easier to follow for beginners. Would that be helpful to people?
Mitch says
WOOT!!! It all seems to be working now!
Using WP3.0 RC1 Thesis 1.7 and running WP with subdomains.
Folders get named the full subdomain (corporate.website.com)
functions.php
line 11 requires this code (which I had missed the one line of)
$blog_id = $current_blog->blog_id;
$blog = get_blog_details($blog_id)->domain;
`
Thanks to AJ (http://atlantawebmaster.com) for allowing me to call him and talk me thru the fixes to the functions file and getting this to work.Huge callout to AJ.
Kristarella – thank you for the great post and forum to help others.
psst – can you update the instructions at the top ๐
Thanks everyone!!!
Mitch
aj martin says
glad you got it working – thanks to Kristella and Dixie for this information –
John – a tutorial would be great seems you would have to consider both the folder and the subdomain setup scenarios ?
aj
drt says
Hi Kristarella,
I was trying to create new site using thesis, for multiple blogs with their own layouts. I followed your suggestion to change the function.php, but after I copy the files from custom folder to custom/blog-name, now I could not open the test page that I have created earlier in the default location.
When I went back to commented out the changes in function.php, deleted blog-name folder, the post can be seen again. But as soon as I went to change the default setting of blog-name, I keep getting the 404.
When I tried to go to dashboard by clicking wp admin link, I got this redirection:
http://latest-poll.com/custom/.....p-admin%2F
I went back to change the
//define(‘THESIS_CUSTOM_FOLDER’, get_bloginfo(‘template_url’) . ‘/custom’); #wp
into
/*define(‘THESIS_CUSTOM_FOLDER’, get_bloginfo(‘template_url’) . ‘/custom’); #wp */
but still got the same result.
Thanks for your reply via tweeter.
kristarella says
drt — It seems like the modifications are just not implemented properly on your site. I think it might be best if you start again with a fresh functions.php file.
I don’t know why the admin link would go to /custom/blog-name/wp-login.php. That is quite wrong. It should go to /wp-admin/wp-login.php.
That last change you mention would not have done anything because it’s the original line in functions.php commented out in two different ways:
//
and/* ... */
are both ways of commenting something out.I have taken screenshots of what functions.php should look like before and after the modifications, with the modifications highlighted in the after screenshot.
Hope that helps you smooth it out. And note that the folder structure should be one folder inside the custom folder for each site (including the main one), and the folder name needs to be exactly the same as the site name, except with spaces replacing hyphens. So presumably you would use capitals in the site names and the folder would need to be Blog-Name, not blog-name.
Emil says
Thank you for this Kristarella. Took me longer to get the spelling of your name correctly than it did to set this up;-).
Haven’t read all the comments but can confirm this works perfectly with a 3.0upgrade, subdomains,sub-directories and latest Thesis(1.8b).
Thanks again
Paul says
I’ve been having difficulties getting this to work on a fresh wp3.1/thesis1.8beta1 install.
Is there any reason why it shouldn’t work with the latest Thesis?
thanks in advance.
kristarella says
Paul — Although I haven’t tried that combination yet, I can’t see any reason in particular that it shouldn’t work. I just took a look at functions.php in Thesis 1.8b1 and it looks essentially the same as 1.7 (see the screenshot in comment 107 for the changes). And I just upgraded my test network to WP 3.0.1 which uses this with Thesis 1.7 and it seems fine…
In what way is it not working for you?
Paul says
Thanks Kristen,
I’ve been running your solution effectively on previous versions of Thesis so I’m pretty clear I have it set up correctly…
I have 1.81b running with wp3.01, but when I upload the updated functions.php I get this error message….
Fatal error: Class ‘thesis_term_options’ not found in /home/xxxxxx/public_html/wp-content/themes/thesis_18b1/lib/functions/launch.php on line 12
Any thoughts? thanks
kristarella says
Paul — Sounds like you don’t have all of the 1.8 theme files uploaded. You may be missing lib/classes/options_terms.php, which is a new file in 1.8 and contains the ‘thesis_term_options’ class. Thesis 1.8b2 is out so maybe try again with that. There was a hacked version of 1.8b1 that was out for a few days, so by going to 1.8b2 you can make sure it’s clean and make sure all the files get uploaded.
Paul says
That worked! but I found had to overcome another issue first which might help someone else…
When uploading updated files with FTP, I have a protocol of renaming the original and leaving it on the server for future reference….
So I renamed the original file first – then I uploaded the edited version into its place… this was still generating the error.
When I just overwrote the original functions.php with the edited version, everything worked smoothly.
I don’t understand why this worked, but it did. Thanks for your help
Curtis Abbott says
Kristen,
That you so much for your help. I am a novice at these things with virtually zero foundation to build on. Everything was working good as prescribed above on 1.8b1 but I must admit that I have not tried to create a new blog lately.
Last night I upgraded to 1.8 stable and I noticed that there was what appears like new code in the functions.php file.
It is the two lines below that I have commented out with the term “STYLESHEETPATH” in them. The blogs seem to still work both commented out or converted to the same format as the “$blog” lines right below.
Here is the excerpt… (I tried the Escaped character thing but everything looks the same to me)
// Blog nicename
$blog = str_replace( " ","-",get_bloginfo(‘name’) );
// Define directory constants
define(‘THESIS_LIB’, TEMPLATEPATH . ‘/lib’);
define(‘THESIS_ADMIN’, THESIS_LIB . ‘/admin’);
define(‘THESIS_CLASSES’, THESIS_LIB . ‘/classes’);
define(‘THESIS_FUNCTIONS’, THESIS_LIB . ‘/functions’);
define(‘THESIS_CSS’, THESIS_LIB . ‘/css’);
define(‘THESIS_HTML’, THESIS_LIB . ‘/html’);
define(‘THESIS_SCRIPTS’, THESIS_LIB . ‘/scripts’);
define(‘THESIS_IMAGES’, THESIS_LIB . ‘/images’);
//define(‘THESIS_CUSTOM’, STYLESHEETPATH . ‘/custom’);
define(‘THESIS_CUSTOM’, TEMPLATEPATH . ‘/custom/’ . $blog);
// Define folder constants
define(‘THESIS_CSS_FOLDER’, get_bloginfo(‘template_url’) . ‘/lib/css’); #wp
define(‘THESIS_SCRIPTS_FOLDER’, get_bloginfo(‘template_url’) . ‘/lib/scripts’); #wp
define(‘THESIS_IMAGES_FOLDER’, get_bloginfo(‘template_url’) . ‘/lib/images’); #wp
if (file_exists(THESIS_CUSTOM)) {
// define(‘THESIS_CUSTOM_FOLDER’, get_bloginfo(‘stylesheet_directory’) . ‘/custom’); #wp
define(‘THESIS_CUSTOM_FOLDER’, get_bloginfo(‘template_url’) . ‘/custom/’ . $blog); #wp
define(‘THESIS_LAYOUT_CSS’, THESIS_CUSTOM . ‘/layout.css’);
define(‘THESIS_ROTATOR’, THESIS_CUSTOM . ‘/rotator’);
define(‘THESIS_ROTATOR_FOLDER’, THESIS_CUSTOM_FOLDER . ‘/rotator’);
When I try to add another blog to the mix with the same contents as the crazymarketingguy.com custom folder I get the results that you can see at http://waveofyouth.com.
I am a bit baffled at this though it may be obvious to others.
Here are my questions…
1. Are there any changes to this method described above due to changes in 1.8 stable?
2. Could my issue with creating a new blog be related to this?
3. Any suggestions?
Thank you for your help.
Curtis
kristarella says
Curtis — That’s strange. I tend to use the same Thesis download for all the site I make and my original Thesis 1.8 download doesn’t use STYLESHEETPATH, but I downloaded 1.8 again and it’s in there.
I’m not sure why your ile isn’t working, but I’ve made the modifications to the new 1.8 functions.php file again. Try replacing your whole file with:
Paul says
Hi. Thanks for the instructions. I’ve followed everything you said, but I have run into another problem that is preventing me from seeing (or even activating) the thesis theme on my new sub-blog .
I can view the new sub-blog ( http://www.bodhicharya.org/manyroads ), but when I go to WP-Admin (via any means) It generates a huge url and the error message:
Request-URI Too Large
The requested URL’s length exceeds the capacity limit for this server.
I know this is not really the place to look for answers, but I am getting no response from the WP Multisite forums. Am I just missing something simple? The ‘redirection’ plugin also seemed to stop working at the same time, so I re-installed it.
Thanks for any help you can give.
kristarella says
Paul — If you’re having URL issues of any kind I would deactivate any plugins that could be playing with links at all. It’s quite likely that the redirection plugin is causing a redirection loop preventing you from accessing that dashboard.
Curtis — I was working with a site last night that had the same errors you had and it was because they didn’t have a folder inside the custom folder for each site on the WordPress network. They only had a folder for the sub-site and the main site’s files were still directly in custom. There needs to be a named folder in custom for every site on the network, including the main/original blog.
Paul says
Thanks Kristarella. I managed to fix that. It was the ‘Theme My Login’ plugin. So now I can login to the new sub-website ( http://www.bodhicharya.org/manyroads) and have activated thesis.
But now, this morning, I’m getting reports that the main website layout has gone wonky!
The custom CSS seems to be there and all the design settings are still in the admin, but something is overriding them. I’m assuming its the other blog.
kristarella says
Paul — As far as I can tell both sites are using the regular custom folder, not a multi-site modification.
Paul says
I just tried using the code you posted above in post 115.
When I do, The s-b-site seems ok, but my main site completely defaults to the default Thesis settings (throwing things all over the page!).
Do I need to create a custom sub-folder for my main site as well s the new sub-site?
Running out of ideas now.
kristarella says
Paul — Yes, you definitely do need a folder for the main site as well, I mentioned that to Curtis in comment 117; I didn’t know your site was doing the same thing.
Paul says
thanks.
i now have two folders in the custom folder. One is the main blog /bodhicharya and the other is the sub-blog /many-roads.
Now both sites are defaulting to the default Thesis settings.
Do I just need these two folders in my custom folder and should delete the rest of the contents?
I just tried deleting the custom-sample folder, but that just made it worse.
kristarella says
Paul — If you’re using my code the folder names need to be the exact name of the site including capital letters, except for the spaces replace by hyphens. If you don’t want to use capital letters you need to replace
$blog = str_replace( " ","-",get_bloginfo('name') );
with$blog = strtolower(str_replace( " ","-",get_bloginfo('name') ));
in functions.php.Paul says
I just can’t believe it was that simple! Re-named both folders with their capital letters and all is working fine. So far. . .
Thank you for your help with this and for providing the solution.
All the best. Paul
Curtis Abbott says
Kristen,
Thank you for your help. Things still are not working for what is intended to be my test site but everything else is.
http://crazymarketingguy.com
http://vestedwellness.com
http://pathsoftruth.com
http://shawnaabbott.com
Test site that is not working:
http://waveofyouth.com
I must admit that I don’t understand the capital letter issue but I have all of these set up identically as far as I can tell. I must admit that bothering you with my problems is bothering me. So feel free to say, “Dude, go figure it out yourself.”
Thank you for the clear instruction provided above that got me this far in my noviceness. I am new to this whole realm.
Thanks again,
Curtis
P.S. I was once engaged to a girl named Kristen with your same spelling.
kristarella says
Curtis — I’m afraid I can’t tell where it’s going wrong just by looking at it; I can only say that the last site is not set up the same as the others. Also I’ve never used domain mapping like you’re doing, so I don’t know how that affects the set up… I’m assuming that’s why each site has a different domain name.
Dixie Vogel says
Curtis, you may want to poke around in the database directly to see how the blog name is listed in there. If your blog name is “Eza’s Test Site” it’s probably that apostrophe doing it. I ran across the same issue when I first tried this, one of the reasons why I tweaked K’s code to use blog ID numbers instead of names. It will use encoding in the table for that apostrophe, but your custom folder probably has the apostrophe character.
Curtis Abbott says
Between the comments surrounding “Upper and Lower cases” and Dixie’s comments about “Eza’s Test Site” I finally got it. It is now fixed.
Here is the essence of my breakthrough in understanding…
You will notice above that in all circumstances above I have the “Site Name” as basically the URL. So, earlier I was thinking why do I have to use upper case to get this to work when I have the URL listed as lower case. Then, when Dixie’s comment came about recognition of my error clicked into place.
These subfolders (within the Custom folder) are not the URL but the site name itself. Obvious to everyone else I know, but due to my choice of past site names it was not as obvious to me until now. So, all I did was change the site name to WaveofYouth.com and everything was instantly working.
Thank you all for your help. I am learning but unfortunately have very little time as of late. In fact, right now every single blog post has been written by an employee I hired in the Philippines named Eza. I know she is quite a good writer and now, Eza’s test site will be working thanks to you and Dixie.
Hopefully someone else on here is at a sufficiently rudimentary level to learn from my experience.
Thank you ladies,
Curtis
handig says
I followed the instructions above, but got error messages.
Then I copied functions.php code at remark 115 and that worked. The difference is that there is are two spaces that shouldn’t be there in the line:
define(‘THESIS_CUSTOM’, TEMPLATEPATH . ‘/custom/’ . $blog);
It is between /custom/’ and $blog);
On the thesis forum http://diythemes.com/forums/sh.....-with-WPMU they suggested that you should also change the lib/scripts/thumb.php code (line 67) to:
$cache_dir = ‘../../custom-‘.basename(get_bloginfo(‘url’)).’/cache’;
Is that also correct in Thesis 1.8?
handig says
Hi,
The above solution works nice. Watch out for the folder names under custom with cases and hyphens.
I found another way on:
http://www.binaryturf.com/usin.....tallation/
to use the blogid instead of the blogname. That way you can rename a site without breaking the theme.
Thesis 1.8 Changes to functions.php:
1. Change line 21: define(‘THESIS_CUSTOM’, STYLESHEETPATH . ‘/custom’);
into: define(‘THESIS_CUSTOM’, STYLESHEETPATH . ‘/custom/’.$wpdb->blogid);
2. change line 29: define(‘THESIS_CUSTOM_FOLDER’, get_bloginfo(‘stylesheet_directory’) . ‘/custom’); #wp
into: define(‘THESIS_CUSTOM_FOLDER’, get_bloginfo(‘stylesheet_directory’) . ‘/custom/’.$wpdb->blogid); #wp
3. Add line above the line with: // Define directory constants
Add this line: global $wpdb;
Change the lib/scripts/thumb.php:
Line 67:
$cache_dir = ‘../../custom/cache’;
to:
$cache_dir = ‘../../custom-‘.$wpdb->blogid.’/cache’;
With the above modifications, simply copy the custom directory for each blog as there blog-id number. So e.g. http://blogs.example.com/wp-co.....8/custom/1, http://blogs.example.com/wp-co.....8/custom/2 etc.
handig says
Correction in change to the lib/scripts/thumb.php:
Line 67:
$cache_dir = โ../../custom/cacheโ;
to:
$cache_dir = โ../../custom/โ.$wpdb->blogid.โ/cacheโ;
kristarella says
Handig — Actually those spaces in
'/custom/' . $blog
don’t make any difference. There are no mistakes in the code above, only stylistic preferences.You can use whatever tutorial you want, but I would suggest that unless you know PHP well that you don’t chop and change between tutorials. I think that’s where much of the confusion in the forum thread came from.
I’m yet to see whether it actually makes any difference to have separate cache folders for timthumb, but since that timthumb script doesn’t work properly without modification in multisite, it makes sense to edit that as well.
handig says
Hi,
You’re right. it is only an alternative.
Thanks for your help.
Peter Kindness says
Hi everyone,
I followed the instructions and made an amend to suit Thesis 1.8 (see here: http://www.politivi.com/2010/0.....sis-theme/) but I don’t have a Super Admin panel and the end, suggesting that I’ve failed to get WPMU to work…
I’m adding WPMU to this site: http:secondparallel.com which still work so I’ve not broken anything! Phew.
Can anyone help please? Admin access given if required.
Thanks, Pete
kristarella says
Peter — Try the Codex instructions for making a WordPress network to get WPMS working.
Alwin says
Hi Kris,
i follow the instruction here http://diythemes.com/thesis/rt.....multisite/
my question is:
1. how possible if someone register on my multisite, it will automatically create a custom folder for them? because i dont want to create every members each folder manually..
2. i want to restrict all my user to edit only the custom.css and provide master custom folder to all the sites. how is that posible?
kristarella says
Alwin — I didn’t write those particular instructions on the forum, but they’re a similar idea…
It would make more sense to add a folder when a new blog is created, and you’d need to add a function to a hook in WordPress to do so. Something like (currently untested!):
This would work best in a plugin that is network activated so that it is present upon the creation of a blog and you’d need to make sure your Thesis folder name is right in the function. However, that would only create the custom folder and not the custom.css, cache folder or layout.css file inside it…
I’d be inclined to go with something more like the PHP copy function and the recursive copy example on that page to copy a default custom folder, or a default child theme in the themes folder (I have another post on child themes and Thesis).
I’m not sure about the best way to do the second one… You could not include custom_functions.php in the active custom folder in order to prevent blog users from being able to edit it and then provide extra CSS and functions via the plugin that has the copying function, rather than a theme functions file (there is little to no difference between the way custom_functions.php and a plugin works on WordPress).
This conversation could get quite lengthy and complicated, so further discussion is probably better off in the forum.
Hieu Vinc says
Hi
It work with me, I used blog name. But It didn’t work with Blog ID.
I used title for blog name, but my title have contain special character like “|”, I can’t create folder contain “|” .
Anyone have ideas ? Can I convert it ?
Thanks very much
kristarella says
Hieu — Characters in names is not something I anticipated with this method. If you want to continue with this method, it’s probably better to use blog IDs as per the other comments, but if not you can use child themes; they are my preferred method to work with WP multisite these days… You can apply a different child theme to each blog,
Hieu Vinc says
Hi Kristarella !
I have try with blog ID, after 3 hour , It’s worked with me , I have use it :
* @package Thesis
*/
global $wpdb;
// Define directory constants
define(‘THESIS_CUSTOM’, TEMPLATEPATH . ‘/custom/’ . $wpdb->blogid);
define(‘THESIS_CUSTOM_FOLDER’, get_bloginfo(‘template_url’) . ‘/custom/’ . $wpdb->blogid); #wp
And folder is : thesis_18/custom/your_blogID
Thanks for reply
Hieu
tomek says
Any news about how to integrate thesis with buddypress? Is there any way to download this genealogies theme?
kristarella says
Tomek — Yep, there’s a thread in the forum about it and you can download the latest BuddyPress-Thesis child theme. You need to make sure the template name in style.css is the same as the folder name of the Thesis folder in your themes folder, and copy your custom folder over to the child theme.