Setting up a template account for all accounts in the network

Hi!

I'm running a multisite installation, and I'd like to set up a template account for all the accounts in the network, in such a way that all the modifications made to this template account will be applied to all accounts, even the ones from users who registered in the site before the change being made. I'm already using WPMU Blog Templates, but the changes I make in the template account only apply to new users, this way it's impossible for me to change something across the entire network.

If that would require too much custom coding, I'd like to at least be able to have the widgets I set up on wp admin to be displayed on every subsite, old or new.

If you need it, my login credentials were sent around 3-4 days ago through WPMU's contact form, with Aicee's name at the subject line.

Thanks.

  • Ash

    Hello @Gabriel

    I hope you are well today and thanks for asking the question.

    This is not possible with new blog template plugin. It will need huge changes of the core plugin. And this is not even something we have in our to-do list.

    If that would require too much custom coding, I'd like to at least be able to have the widgets I set up on wp admin to be displayed on every subsite, old or new.

    This is not possible too. Widget depends on theme. The subsite admin always can change or delete any widget from Appearances > Widgets. What you can do is hard code the widget in the sidebar of your theme. In that case, all the subsites need to use the exact same theme. There is no other way.

    Also, if you need to customise this then you can post a job in our job board where you can hire a developer to assist further: https://premium.wpmudev.org/wpmu-jobs/ Please note that, no WPMU official staff is available in the job board.

    Cheers
    Ash

  • Ash

    Hello @Gabriel

    It won't work from page builder. It will work from page builder, only if the theme is coded in that way.

    If the theme is an usual wordpress theme, then it won't work. When you use page builder, all the changes are saved into the table for main site only. Every subsite has its own tables in the database. So, your changes has to be hard coded in the theme and all subsites need to use same theme.

    Cheers
    Ash

  • Wheel of Commerce

    Here's what @Michelle Shull told me as this came up on another thread:
    "Can you edit the template file for the Front End pages? If so, we may just need to make it sidebar ready. (That's one line of code.) http://tahirtaous.blogspot.com/2012/09/how-to-make-wordpress-themes-sidebar.html If Front End has a functions.php file, you can add the theme code at that link and it may(?) work, depending on how cruddy the coding is for Front End. (I am mildly optimistic here)."

    Any more specifics on this? Remembering that I'm not a coder.

    Thanks.

  • Wheel of Commerce

    Hi, man!

    It's in regards to displaying the widgets on the pages generated by TT MP Frontend. So far, the only solution I've come up with isn't fully satisfatory, as I have to insert the widgets in the template account (from Blog Templates) and they only get inserted in the account that are created after the change was made. So, from what I understand, Michelle suggested a way to get the widgets directly inserted into the template used by the pages from TT MP Frontend. Since I'm no coder, I'd nee the specifics on how to proceed.

    Thanks.

  • Ash

    Hello @Gabriel

    Yes, you have to hardcode it into the template. I am not familiar with TT MP Frontend. You need to ask the plugin developer about this.

    Also, I think it will need a fair amount of custom code. Also, if you need to customise then you can post a job in our job board where you can hire a developer to assist further: https://premium.wpmudev.org/wpmu-jobs/ Please note that, no WPMU official staff is available in the job board.

    Cheers
    Ash

  • Wheel of Commerce

    I know, Michelle gave me some general guidance on it, but I need more specifics. If you prefer, feel free to leave this thread to her -I'm pinging her in this post just in case you decide to do so.

    @Michelle Shull
    "Can you edit the template file for the Front End pages?"
    I've used this plugin: https://wordpress.org/plugins/reveal-template/ to identify the template for those pages (you can see it displayed at the footer when seeing a page as super-admin), but it's accusing the template to be pro3/single.php, which is unlikely to be correct, as if that was the case the widgets should be displayed there, which they are not.

    The instructions provided on the link Michelle mentioned are as follows:
    " How to make wordpress theme's Sidebar Widget Ready ?
    it is very easy to make any wordpress theme's sidebar widget ready. in first step add following code to functions.php file if does not exists than create one.

    <?php
    register_sidebar();
    ?>

    Now add following code in your sidebar.php if does not exists than create one.

    <aside>
    <?php if ( !dynamic_sidebar() ) : ?>
    <h2>Sidebar</h2>
    <?php endif; ?>
    </aside>

    Congrats. You have a widget ready sidebar. "

    Continuing with what Michelle told me:
    "If Front End has a functions.php file, you can add the theme code at that link and it may(?) work, depending on how cruddy the coding is for Front End. (I am mildly optimistic here)."
    I'm sorry, but I didn't get this one: you mean for me to add what's provided at that page you mentioned in a functions.php file inside TT MP Frontend, right? Or do you mean for me to add some code from my theme into a functions.php file inside TT MP Frontend? I didn't get what you mean by "theme code".

    Thanks.

  • Michelle Shull

    Hey Gabe!

    This is a bit of a longshot, and I forgot you were using a builder, so that may prevent this from working at all.

    In your theme folder, there should be a functions.php file. (Not MPFront End, the theme itself.)
    Add the register sidebar line to functions.php.
    Make sure there is a sidebar.php file in the theme folder.
    If there's not one, create one with the second bit of code in it. If there is a sidebar.php file, make sure that line of code is in there.

    Again, this is a long shot, and I'm pretty sure your page builder will block this from working, but it's a five minute fix if it works. :slight_smile:

    The issue with the widgets not showing is because of the theme, for once, MarketPress Front End is not the problem here, the theme itself is coded old-school. (*technical term.)

    I've got to backup what my friend and colleague @Ashok says here, I think, after at least a year of development, you may actually save yourself a bunch of time (and possibly money) by hiring someone to take this to the hole for you. You're almost there, and these last few issues are spinning us all in circles, a dev could wrap this up for you in a weekend, and you'd be live, and we'd all be on our way to your house for that party you've promised. :wink:

    Consider it. I wouldn't lead you astray here, I honestly think it's in the best interests of your site and future business.

    Thanks, Gabe!

  • Wheel of Commerce

    Now that you mentioned the party thing, Jude actually took it seriously, haha. I always try as much as possible to figure out the issues wihtout having to hire a dev, as this has been more of a side gig for me -well, except for the part that it didn't make me any money so far, lol.

    About the widgets thing, I think I'm in the right direction here, as after applying those changes I'm now seeing written "Sidebar", at the sidebar area of one of those product's page (example: https://www.wheelofcommerce.com/testaccount12/store/products/patricks-fabulous-thing/). The thing is: my theme does have a sidebar.php, but it also has sidebar-2.php, sidebar-3.php and sidebar-4.php. Like I've said, even though I'mwell aware that I'll end up having to hire a dev to fix some of my bugs, this really doesn't seem to be the case here, as I can also contact the theme's dev about it.

    If you want, I can paste a copy of those sidebar files here, but I think it's more practical if you use the credentials I've sent with Aicee's name on an email around Sunday-Monday (like a week ago) to access my site through FTP. I'm using a child theme btw, so the sidebar.php with that code mentioned in the tutorial you provided me is inside the child theme, obviously.

    Thanks again. :slight_smile:

  • Michelle Shull

    Hey, Gabe!

    If you're seeing "Sidebar", then you're all set. Just add the widgets as you normally would, via Appearances > Widgets. You can replace this line: <h2>Sidebar</h2>, but if you follow that snippet, you can see it will only show text if the area where it's displayed is a dynamic sidebar. Since it is, you should be able to add whatever you need via Appearances > Widgets.

    The instructions above were a tutorial for you to follow, for more custom code, beyond what's already been written for you by our team, you'll need to DIY or hire a dev.

    Thanks a bunch for understanding where we're drawing the line between support and custom development.

  • Wheel of Commerce

    Thanks for answering so fast.

    So to have these changes applied to all subsites, old and new, I'd need to hire a dev, right? Because I already have sidebar widgets set up in both wp admin and the test account.

    From my superficial understanding of this, it's a situation similar to that of adding CSS to the Custom CSS of the template account or doing it in styles.css: the first get applied only to new acounts, while the last gets applied everywhere. So can't I copy/paste some file, code or whatever from the template account to a folder in my root (or somewhere of the sorts) in order to get the widgets from the template account to be displayed at all accounts, old and new? I'm just wondering here.

    Regarding that tutorial titled "How to make wordpress theme's Sidebar Widget Ready ?", my theme, Pro3, already is sidebar widget ready, as I can see all widgets there normally, so I guess that doesn't actually applies to what I'm trying to do here, correct? I so, I'll undo the modifications I've done referring to this.

    Thanks. :slight_smile:

  • Michelle Shull

    Heya Gabe!

    So to have these changes applied to all subsites, old and new, I'd need to hire a dev, right? Because I already have sidebar widgets set up in both wp admin and the test account.

    Yep. You wouldn't, normally, but between MPFront End, your theme, and the custom stuff we'd added, having a dedicated dev untangle everything with a few hours of intensive work is going to pay off so much for you here. They can clean up the band-aids we've given you and make everything work efficiently. Not that our work is bad (at all, we kinda rock), but you've worked with at least a dozen of us, and we all have our own quirks and foibles that show up in our code. One guy (or lady!) who can see the big picture and lay everything out on the table is going to be able to point at the remaining weak spots in your site, and then create solutions on the spot. :slight_smile:

    Let's do a metaphor here. You're a car guy, so let's use cars. You are trying to add a supercharger (MP Front End + your theme + customizations) to a stock engine (WordPress + MarketPress). Your crankshaft (all the lines of custom code/tweaks/bubblegum & bindertwine we've added) isn't strong enough to support the power. A dev can rebuild the bottom end, to provide the support you need to handle the power from the supercharger.

    From my superficial understanding of this, it's a situation similar to that of adding CSS to the Custom CSS of the template account or doing it in styles.css: the first get applied only to new acounts, while the last gets applied everywhere. So can't I copy/paste some file, code or whatever from the template account to a folder in my root (or somewhere of the sorts) in order to get the widgets from the template account to be displayed at all accounts, old and new? I'm just wondering here.

    I'm having fun with the car metaphors, let's keep those going. They won't be played out until the end of the post, at the earliest. :wink: Your site, at it's core, is a generic Mustang you bought off the lot with no options. Copying CSS is like changing the air filter. A new air filter for your model year you buy at the local parts store is going to fit, no matter which manufacturer you use. The air filter drops in with a minute of work. (Depending on the model year, obviously, some model years have better access than others.) Moving the widgets is more akin to bleeding your brakes, on your site in particular. Normally, a member could Clone/Snapshot/New Blog Template your way into universal sitebar widgets, but for some reason none of us can nail down, your theme has no idea what to do with page builder content, sometimes, so you end up with empty sidebars.

    Here, a dev can get in and bleed your brakes for you, and you don't have to worry about him leaving air in the lines that could really mess up your day later.

    Regarding that tutorial titled "How to make wordpress theme's Sidebar Widget Ready ?", my theme, Pro3, already is sidebar widget ready, as I can see all widgets there normally, so I guess that doesn't actually applies to what I'm trying to do here, correct? I so, I'll undo the modifications I've done referring to this.

    I believe so, we tried this because you were seeing the "add widgets by going to Appearance..." or something similar where the widgets should have been showing on the virtual pages/custom post types. That error usually means sidebars aren't ready for widgets, or themes (or single template files) aren't ready for sidebars. Since your theme is ready for sidebars, you can undo the changes you've made and give a dev (if you're hiring one) a clean(-ish) slate to work with.

    I'm sad I couldn't work in another car metaphor there...

    Does this clear things up at all? :slight_smile:

  • Wheel of Commerce

    Yes, it's clear, haha. The oddest thing here is: the dev who created my theme built it specifically for Marketpress -his name is Nathan Onn, he used to work at WPMU. He also created MP Mojo, that handles many of the functions I have associated with Marketpress. Considering that, it's really strange that widgets don't get displayed at all stores, having to be set through the template account.

    Regarding the dev thing: how much would it cost me? Like I always said, this started as a side gig for me, but I've decided to take it more seriously for a while now. Nevertheless, I'm obviously not swiming in money, haha.

    About the general idea here: I know that, before launching, I'll have to hire a dev to check if everything is absolutely okay, but, in order to have an idea regarding the current state of my site, I'd like to know if I decide to launch it now, is there anything there that would cause it to break? Or the only limiting factor I'm dealing with here is the capacity of my server?

    Thanks, Michelle. And thanks for those dev points too, I guess I'll finally make it to the WPMU hall of fame, lol. :stuck_out_tongue:

  • Jude

    Hey Gabriel

    Very simply put for a PRO dev it could be about 4-5 hrs work to take your site to live.. a less experienced dev can take upto 18-20. You can do the math depending on the hourly rate.

    You definitely need a VPS for your site .. Im thinking 4GB RAM initially more later on.

    Finally you already are in the hall of fame .. another ~200 points and you get a years free membership too

    Cheers
    Jude

  • Wheel of Commerce

    Okay, a pro dev charges like $50/hour, right? Anybody you recommend? Bceuase I'd much rather go with someone you guys recommend than hire somebody wihtout any recommendation from people I trust. Btw, I'm not going to hire the dev right now, as there're still some functions I'm going to add, and things that can be fixed without him/her. Which is one of the reasons I've been contacting the devs of some of my paid plugins (I've even talked to some of them to get custom stuff there) and posting here intensely lately.

    Good thing you touched on the server issue: considering what my site is intended to, don't you think I need one of those 32 GB of RAM dedicated servers? Because I'm running on a 1 GB VPS, and even with no users (as I haven't launched the site yet), I'm already consuming 50% of the RAM.

    Something I've just noticed at my functions.php: it doesn't have a "?>". Isn't that a problem?

    Thanks.

  • Michelle Shull

    Hey Gabe!

    The price per hour will depend on the dev. $50 is pretty high, I'd look in the $35-$50 range. You can create a simple task and pay your top contenders to complete it to help make your final decision. A good interview over Skype can tell you a lot, too.

    32GB of RAM is pretty meaty, it'll hold up to a lot. I'd look into scaling into that range, however, rather than biting off that much in the beginning. That's going to be quite spendy. 4GB and a GB connection to start should be more than enough to get you off the ground. I don't know a host that wouldn't jump at the chance to grow with a company, especially when you've got your eye on a turbocharged server in the future.

    Something I've just noticed at my functions.php: it doesn't have a "?>". Isn't that a problem?

    Nope!

  • Wheel of Commerce

    Thanks for the answer! :slight_smile:

    Actually, for some obscure reason I haven't yet figured out, GoDaddy charges far less for dedicated servers here in Brazil than in US (and the servers being used are the same, all in USA), so their most advanced hosting plan (not considering the custom ones, of course), which is this dedicated 32 GB of RAM, fully managed, costs the equivalent of 300 US dollars in Brazil, while in US it's like twice this value. Especially considering that I have a chat system and that, like I said, I'm already using 50% of my 1 GB VPS with no users in the site, don't you think that much less than these 32 GB could represent a problem?

    Thanks again for all the clarifications, I appreciate it. :slight_smile:

  • Ash

    Hello @Gabriel

    I hope you are well today.

    I don't think 32GB RAM is needed unless you have a huge network site!

    I would like to have a VPS from DigitalOcean or Ramnode. Even VPSDime is good too. The interesting thing about VPSDime is they will provide you a separate MySQL server, so it won't take extra load on the web server.

    GoDaddy is experienced too, but I never used that VPS, neither I want to try :slight_smile:

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.