Multisite: One theme across multiple sites with variables?
-
I run a network of about 10 sites that use the same custom theme. What I’m looking to insert into the theme is the ability to have certain text change based on which site is being visited.
For a simple example, if you go to Site #1, I’d want it to say something along the lines of “
Hello and welcome to Site #1!
“If you visit site #19, I want it to say, “
Hello and welcome to Site #19!
“My thought was to use conditionals in the theme (saw that here: https://lauragentry.com/blog/2010/08/02/applying-one-theme-to-multiple-blogs-in-wordpress-multisite/), however I have **multiple areas** within the theme where this process needs to be implemented and when you’re running a large amount of sites, using a bunch of conditionals will result in a ridiculously large file size for a theme and create a huge burden on the server.
So my next thought, and I believe the likely direction of the solution, is to use a theme options page where I (or a user) can simply visit the Theme Options page for that blog and change various fields that are hard-coded in the theme to what is wished.
- Is this possible?
- If so, how can I do this?
- If not, what would you suggest as the best route to accomplish this?
I appreciate any and all help you can provide and thank you in advance!
- The topic ‘Multisite: One theme across multiple sites with variables?’ is closed to new replies.