Multisite with subdmains ~ I need to alter same theme for each subdomain (21 posts)

  1. buzzfyre
    Posted 5 years ago #

    I have just installed Multisite using subdomains. Each subdomain site has the same theme but I wish that theme to function slightly different ( I will alter some of the files according to subdomain). I cannot find where he separate instances of the theme are stored on my server. How do I alter each instance of the same theme so I can have them look slightly different? Your help is appreciated. :-) Thanks!!!!

  2. James Collins
    Posted 5 years ago #

    In Multisite, Plugin and Theme files are shared across all sites on the installation.

    So modifying a theme means that the modification will also affect all other sites that use that same theme.

  3. buzzfyre
    Posted 5 years ago #

    Thanks James, I was dreading your answer... haha! Is there any way I could recreate the theme several times? for example: Rename them as if they were several different themes... theme1, theme2, theme3, etc.? And then attach the separate themes to each subdomain.... How do I go about doing that?

  4. buzzfyre
    Posted 5 years ago #

    I've just renamed the theme folder and the name within the CSS file and it seems to work.

  5. James Collins
    Posted 5 years ago #

    Is it just the look/presentation of the theme that needs to differ on each site?

    ie can the differences be implemented using just CSS?

    If so, I'd recommend creating a child theme (http://codex.wordpress.org/Child_Themes) for each site.

    That way you don't have to duplicate twentyten each time - you just create a new child theme that has some additional different CSS rules.

    Then when there's an update to twentyten, its dead easy to update to it.

  6. Or use a css plugin.


    That gives you the same thing as the css upgrade on wordpress.com, which is also multisite.

  7. kkradel
    Posted 5 years ago #

    I have the same problem. I've fudged the site title to something I can live with, but I want to use a different set of rotating images in the header of each subdomain.

    I can't figure out where to put the directory of header images for each subdomain. Right now, header images are only showing on the main site.

    I also need to edit each subdomain's home.php page to post specific category posts thumbnails and excerpts - not necessarily the same categories that are used on the main site or on other subdomains (they are region specific).

    While everything else in the theme can be the same across the main site and the subdomains ...

    One of the reasons I wanted to use multisite was so as to not have to have a copy of the theme on each site and have to continually edit so many theme files ...

  8. kkradel
    Posted 5 years ago #

    Added Note: Realized that I could possibly renumber the categories so that the category numbers are the same across the entire site (main site and subdomains) so that might alleviate the need to edit the home.php file.

    Do category numbers conflict with any other given numbers on the site?

    But I still have a rotating header image problem ...

  9. Depends on what you're using to show the rotaing header images in your theme. If it saves them in the theme folder... that's your problem. you need one that saves the rotating images in the media folders.

    category ids are different on every sub site. I would not recommend changing them in the db. If you're using a theme that makes use of cat ids in the home.php.... pick a theme that has a widgetized area there instead and use widgets to show the posts you want.

  10. kkradel
    Posted 5 years ago #

    I can save the images to any folder - the Randomize plugin calls a URL for each image. It's just that the Randomize plugin doesn't seem to work across subdomains - I can't access the plugin admin page on a subdomain. (I can access Random Quotes across the main site and the domains, but not Randomize). It's my task for today. Does anyone know of a random image generator that works across the main site and the subdomains - and can use a different stack of images for each subdomain?

    I've worked for a really long time on my theme and it's the legacy theme for the site - it's a custom hack. I try to stay away from using widgets and plugins as much as possible and instead write code when I am able, although with the move to multisite I've gone overboard with plugin use ... So, in any case I need to *make* the theme work.

    You can see the main site here: artist-at-large.com The row of categories with the thumbs and excerpts are not the exact categories the site will use once it's finished, they are just holding places right now. The one subdomain I've moved so far is sf.artist-at-large.com

  11. I can't access the plugin admin page on a subdomain. (

    do not network activate the plugin.

  12. kkradel
    Posted 5 years ago #

    Still can't access it if I deactivate network and activate on subdomain. I get this message "No rights for this - go away..." in either case when trying to access on subdomain - thinking about a solution ... I haven't finished my coffee yet.

    There are two files for the Randomize plugin. One sits in the wp-content/plugins directory and the other sits in the wp-admin directory. And then an image directory to hold the images.

  13. They may be checking for a certain privilege that is only for super admins when multisite is on, like edit_theme.

    might be time to find a different randomizer too.

  14. kkradel
    Posted 5 years ago #

    Some thoughts and questions on numbering categories:

    You mentioned above that you would change the theme before changing the category numbers in the database to get matching category numbers across all subdomains ... Why is that? Where would the problems lie in changing category numbers.

    I have noticed on one blog I run that the post, page, and category numbers seem to get doled out in order ... so while the category numbering scheme seems to be random, it really isn't. Is that correct?

    If I renumbered all the categories across the main site and subdomains at a series of really high numbers, would the database skip over those numbers should the numbering scheme get that large?

  15. Because there's also a legacy table of global category numbers and you'll throw it off. even tho mostly unused, it can have unpredictable results.

  16. kkradel
    Posted 5 years ago #

    Hmmmm. This is going to drive me insane ....

    Can categories be called out by name rather than cat ID numbers? Is there a way to do that? That would really solve the problem since the categories have the same name across the main site and the subdomains.

  17. Is there some reason you can't just use a widget? One where you can pick a category, regardless of name or number?


    way less work for ya.

  18. kkradel
    Posted 5 years ago #

    Correct me if I'm wrong, because that list of widgets will do exactly what I want - but aren't widgets only posted in the sidebar?

    But I will take a look at them and see if any are usable in the way I want to use them. Or maybe I can learn something from them.

    I never think to look in widgets because I don't use them with this theme, but maybe I can tweak something ...

    Thanks for your patience Andrea_r :)

  19. but aren't widgets only posted in the sidebar?

    No. :)

    Make a widget area in the content section, or maye using home.php. put a widget in it that shows posts. PRESTO!

    See the latest posts section on the front of this page? http://homeschooljournal.net/

    Right now it's set to show all categories, but I could put that same widget in there 5 times to show 5 different categories.

  20. kkradel
    Posted 5 years ago #

    OK, lightbulb.

    So far this works:


    <?php $feature_post = get_posts( 'category=1&numberposts=1' ); ?>

    Change to:

    <?php $feature_post = get_posts( 'category_name=travel-with-a-twist&numberposts=1' ); ?>

    So simple. But maybe posting this will help someone else. It seems to work - it uses the category slugs, so the slugs have to be the same across the main site and subdomains, but those are much easier to edit than category numbers.

    I may change it be more dynamic later - but for now I want to get the whole site moved and functioning first, and then I'll mess with it.

    Now, onto that rotating header image problem.

    Thanks Andrea_r!

  21. kkradel
    Posted 5 years ago #

    For notation's sake in case anyone else is looking ...

    The Random Image Selector will allow for separate header image folders for each subdomain.


Topic Closed

This topic has been closed to new replies.

About this Topic