Sometimes, clients have peculiar requirements when creating a WordPress multisite. For example, they want each sub-site to have certain pages (like ‘Contact Us’, ‘About Us’, etc), with the same layouts. In fact, they want a one-click option to create a new site, with the basic needed pages, and respective pages with the same layout. It’s understandable in certain scenarios. Say for example,
- You have a chain of hotels and want a separate site for each location
- You have a franchise and want different sites for each location, but want each site to have the same look and feel
- You have a directory listing website for say doctors in your community, and want to give each doctor a separate site, but still maintain some uniformity across each site.
In the above scenarios, your requirement, still remains the same. You still want an easy option to replicate page templates across sub-sites in your multisite. The reason as mentioned could be because you want uniformity in terms of styling of these sites, or want control over the structure for branding purposes, etc.
So, how does one go about creating such a multisite? Well, I propose the below given approach.
- Use a single theme for all sites
- Create and replicate page templates for all needed pages, when new site is created.
- Add domain mapping if needed.
So, let’s take a look at all these features in more detail.
Build a Solid Foundation – Choose an easy to Customize Theme
When it comes to choosing a good theme, there are no rules. No matter what someone tells you. You need to study in detail the features of a theme, before deciding on one. You need to ask yourself, ‘Is the theme going to be helpful? Is it going to be on my side?’. Trust me, you want the theme on your side, to provide you the right kind of support. Otherwise, you’ll find yourself fighting against it to get things done.
So, what you could do, is list out all your requirements and pick a theme accordingly. As an example, we will be using Agency Pro Theme as the base theme. The reasons why we have chosen the Agency Pro theme, are a) the theme is based on the Genesis Framework, which means it is easy to customize, speeding up development time and b) the theme provides an option to change the base color, which is a great option, when you want to style individual sites a bit differently.
You need to activate only a single theme on your network, because you want to maintain the same look and feel for all pages.
Create Main Pages of each Site – Use a Template Driven Approach
Even though you would be using a single theme across all sub-sites, each site has the liberty to customize each page differently. But what we want here, is that the elements, on each page should be same as well. For example, the placement of the navigation menu, the sidebar, the contact information in the footer, etc, should be the same across all sites. Respective pages, such as the ‘About Us’ page, ‘Contact Us’ page, etc., should have the same layout, across sub-sites.
This can be controlled by using the same templates for homologous pages. What can be done is, once the layouts and theme settings have been decided, they have to replicated for each sub-site when it is created. For example, say the theme you choose has a ‘Contact Us’ feature. Once the settings have been decided, you can create exact replicas of the ‘Contact Us’ page for every sub-site. If your theme does not have a ‘Contact Us’ feature, then you can use a contact form plugin, and create the contact page. Every time a new site is created, a new form has to be automatically created and added to the sub-site on the ‘Contact Us’ page.
Custom Post Types and Theme Settings
If you’re considering creating Custom Post Types, you should extend your theme, and register the custom post types programmatically. This will ensure that the custom post types will be available across all sub-sites. The templates for each custom post type, will then have to be replicated across all sites as well.
Some themes provide customizable settings, such as default layout, placement of widgets, breadcrumb settings, etc. These settings have to be automatically saved in the database when each new site is created.
A plugin you could consider for this, is the Cloner plugin by WPMUDev. Using this approach, we can provide a one click option to create a sub-site along with the essential pages.
Give Each Site an Identity – Use a Domain Mapping Plugin
By default all sites would be created as a sub-domain of the main site. To give each site a unique domain name, you can use the Domain Mapping plugin. For example, if your main site is example.com, your sub-site would be xyz.example.com, or abc.example.com. Using the domain mapping plugin, you can rename xyz.example.com to xyz.com, and abc.example.com to abc.com.
The advantage of creating subsites, is that each site can be optimized fully for search engines. You have added flexibility, because in case you want to change the look of a particular site, you can still do so. Or if you want to allow different users to manage different sites, you can still do so. Having the same page templates, allows you to still have control on the look and feel of the sites, which can be an advantage when it comes to branding, and can also improve user experience. Do let me know if you have any questions regarding the approach I have suggested. I’d be glad to hear your feedback or suggestions 🙂