Modifying Thesis for Use With Multisite

This document is deprecated! The information on this page refers to a Thesis version that is now obsolete. Please visit the Thesis Docs for current documentation.

This article applies only to those using a Thesis version below 1.8.3.

1. Create Individual Custom Folders for Each Site

Duplicate the Thesis custom folder, once for each site, named after the site ID; for example: custom-1 for site ID 1, custom-2 for site ID 2, etc.

2. Enable the Use of Individual Custom Folders

In functions.php:

a. Change:

define('THESIS_CUSTOM', STYLESHEETPATH . '/custom');


define('THESIS_CUSTOM', STYLESHEETPATH . '/custom-' . $blog_id);

b. Change:

define('THESIS_CUSTOM_FOLDER', get_bloginfo('stylesheet_directory') . '/custom');


define('THESIS_CUSTOM_FOLDER', get_bloginfo('stylesheet_directory') . '/custom-' . $blog_id);

3. Enable Thumbnails to Use and Return the Correct Paths

In lib/scripts/thumb.php:

a. Add the following 2 lines at the beginning (before the define ('CACHE_SIZE', 250); line):

define( 'SHORTINIT', true );
require_once( $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php' );

b. Change:

$cache_dir = '../../custom/cache';


$cache_dir = '../../custom-'. $blog_id . '/cache';

c. Add this line:

$src = str_replace( array( $_SERVER['DOCUMENT_ROOT'], "/files/") , array("", "") , BLOGUPLOADDIR  ) . $src;

just before these lines:

// get path to image on file system
$src = get_document_root($src) . '/' . $src;	

4. Change Upload Path and URL for Site ID 1

You may not need to change these settings – if the Upload Path and URL for site ID 1 already match up to those described here, just skip to step 5.

a. Go to Network Admin > Sites, and select the main site (i.e., ID 1) for editing.

Under Site options (wp_options), look for the Upload Path, and change it to:


Then, look for the Fileupload URL, and change it to:

where is the unique domain name for the site.

Remember to click UPDATE OPTIONS at the bottom of the screen to record your changes.

b. Using your FTP program, navigate to wp-content > blogs.dir, and create a folder named 1; then, inside the folder named 1, create a folder named files – this will be the new storage location for uploaded files for the main site.

5. Enable Access to Theme Options for Site Admins

Change edit_themes to edit_theme_options in each of the following files:

a. In lib/admin/admin.php, within each add_menu_page and add_submenu_page statement within the thesis_add_menu() function.

Changes b, c, and d are necessary only for versions below Thesis 1.8.1.

b. In lib/admin/file_editor.php, within the first if statement within the save_file() function.

c. In lib/classes/options_design.php, within the first if statement within the save_options() function.

d. In lib/classes/options_site.php, within the first if statement within the save_options() function.