For the longest time, if someone wanted to have example.com, foo.example.com and example.com/bar for their Network on Multisite, I’d tell them to use a Multinetwork Plugin like Networks+ (which you can buy from e-Books by Ron and Andrea) or WP Multi Network (free from JJJ).
But sometimes you don’t need multiple networks and the multiple admin sections. Sometimes you just want to have options. Thanks to the work that started with the roadmap you can have your cake and eat it too.
If you’ll recall, I detailed how you can map a domain without a plugin on Multisite these days. Guess what? You can also do this with subfolders and subdomains.
I did this with a subdomain install, since it made more sense to go that way.
WordPress is installed at multisite.dev and I have subsites of foo.multisite.dev and bar.multisite.dev
I then made a new site called baz.multisite.dev:
Then I edited that from this:
To this:
Be careful here! If you don’t put the trailing slash on the folder name, this will not work. And does this work? Yes it does. Of course there is the small issue of how this looks on my list of domains:
I have two sites as ‘multisite.dev’ and I have two ‘foo’ sites (because you can also make foo.multisite.dev/zot if you want to). The problem is that the Sites page in the Network Admin has a check:
$blogname_columns = ( is_subdomain_install() ) ? __( 'Domain' ) : __( 'Path' );
This means the ‘domain’ of foo.multisite.dev/zot and foo.multisite.dev are (correctly) foo. I couldn’t see how to filter, so I made a quick MU Plugin:
class Add_Blog_Blogname {
public function __construct() {
add_filter( 'wpmu_blogs_columns', array( $this, 'blogname' ) );
add_action('manage_sites_custom_column', array( $this, 'blogname_columns' ) , 10, 3);
add_action('manage_blogs_custom_column', array( $this, 'blogname_columns' ) , 10, 3);
}
function blogname_columns($column, $blog_id) {
global $wpdb;
$blog_details = get_blog_details($blog_id);
if ( $column == 'my_blogname' ) {
echo $blog_details->blogname;
}
return $value;
}
// Add in a column header
function blogname($columns) {
$columns['my_blogname'] = __('True BlogName');
return $columns;
}
}
new Add_Blog_Blogname();
This tosses the True Blog Name to the end of the sites list. It’s not perfect, but it gets the job done.











