Show Sidebar Log in
Commons In A Box Logo
  • Home
  • About
    • Project Team
    • Logos and Graphics
  • Showcase
    • CBOX Classic Showcase
    • CBOX OpenLab Showcase
  • Demo
  • Get Started
  • Documentation
    • Technical Guide
    • CBOX Classic Guide
    • CBOX OpenLab Guide
  • Support Forums
    • CBOX Classic
    • CBOX OpenLab
    • Developers Forum
  • News

Group Admins

  • Profile picture of Scott Voth

CBOX OpenLab Support

Public Group active 1 year, 1 month ago

Have a question about Commons In A Box OpenLab, our new platform for open learning? Join the group and post your question here. Register for an account or log in to commonsinabox.org, then join the group and post your question here.

Customizing OpenLab Theme: What are best practices

  • This topic has 5 replies, 2 voices, and was last updated 4 years, 8 months ago by Ray.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • August 11, 2020 at 9:55 am #8462
    Ed Beck
    Participant

    Hi Everyone,

    My name is Ed Beck, and I work at SUNY Oneonta. I lead a cross SUNY collaboration called SUNY Create that uses Reclaim Hosting to build websites with students classes and projects.

    SUNY Geneseo and SUNY Oneonta are kicking the tires on OpenLab for potential use, and we wanted to to further align our OpenLab websites to match our institution’s branding. Both sites are set up as subdomain multisites.

    Our first instinct was to use the custom CSS in the customizer to change things.

    Amanda at Geneseo made a lot of headway making her Openlab look great with Geneseo colors.

    https://geneseocdl.amandawentworth.sunycreate.cloud/

    Where this method really breaks down however is specifically the toolbar on subdomains. Because the subdomain pulls that sites custom css file, and not the main site, the changes to the toolbar disappear.

    https://admin-portfolio.geneseocdl.amandawentworth.sunycreate.cloud/

    Our second thought was to create a new “color” category.

    So instead of having red.css, blue.css, and green.css, there would also be a geneseo.css that we could select from the customizer. We thought that doing a simple search and replace, we could copy 99% of one of the color scheme websheets, and just replace all of certain colors for our institutions branding.

    We were able to create the files, but where I got stuck was, I couldn’t find where to add my new geneseo.css and toolbar-geneseo.css to the customizer menu.

    Third thought was to make a child theme.

    I’ve made child themes before, usually using one of the child theme generator plugins, but I have never done it on a theme as complicated as OpenLab. When I made an automatically generated child theme using two of the more popular child theme generator plugins, a couple things on the website got a little wonky, like the slider’s text.

    <hr />

    I think that the solution should actually be a combination of 2 and 3, but I am having a little trouble figuring out where to start. Any suggestions or words of encouragement?

     

     

    August 13, 2020 at 7:55 pm #8463
    Ray
    Keymaster

    Hi Ed,

    For option 1, the customizer only takes effect for the main site, so that’s why you wouldn’t see the changes on subdomain sites.

    For option 2, you’d need to write a plugin to specifically add the different color scheme. Probably doesn’t make sense to do this as this doesn’t solve the problem you want to solve.

    For option 3, creating a child theme doesn’t solve the problem you want to solve as you want to apply styles from the main site to the subdomain site.

    Is the only issue in styling the toolbar throughout your site? If so, I think the easiest path is to write your custom CSS in an external .css file that should apply to all your sites, then load this CSS file throughout your site via a custom plugin.

    Let me know if you have any other questions.

    August 14, 2020 at 8:47 am #8464
    Ed Beck
    Participant

    We are going to take a shot with this plugin.

    https://wordpress.org/plugins/multisite-custom-css/

    Thanks for the reply.

    August 14, 2020 at 1:35 pm #8465
    Ray
    Keymaster

    Hi Ed,

    That plugin only unlocks the CSS customizer for regular site administrators. It is still limited to the current site and will not apply across all your subdomains.

    August 14, 2020 at 1:46 pm #8466
    Ed Beck
    Participant

    What about this?

    https://wpexplorer-themes.com/total/snippets/multisite-use-main-site-settings/

    August 14, 2020 at 4:09 pm #8467
    Ray
    Keymaster

    Second snippet in that post might work. But it doesn’t perform well because it will query the main site each time to load the main site’s CSS.

    I would go with what I suggested. Write an external .css file and load it manually in a plugin.

    Should be really simple. Something like this in wp-content/plugins/bp-custom.php or in wp-content/mu-plugins/custom.php:

    add_action( 'wp_enqueue_scripts', function() {
        wp_enqueue_style( 'global-css', 'DIRECT LINK TO YOUR CSS FILE', array() );
    }, 99 );
  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Log In
Group logo of CBOX OpenLab Support
  • Home
  • Forum
  • Announcements
  • Docs
  • Members 22
  • Send Invites

Groups

Newest | Active | Popular | Alphabetical
  • Group logo of CBOX Classic Support
    CBOX Classic Support
    287 members
  • Group logo of CBOX Pioneers
    CBOX Pioneers
    71 members
  • Group logo of CBOX Developers
    CBOX Developers
    40 members
  • Group logo of CBOX OpenLab Support
    CBOX OpenLab Support
    22 members
  • Group logo of CBOX-OL Testing Partners
    CBOX-OL Testing Partners
    12 members

CBOX has its roots in the CUNY Academic Commons, which in turn was made possible through funding from The City University of New York itself.

CUNY Logo

CUNY Academic Commons Logo

City Tech logo

The Commons In A Box was made possible through the generous support of the Alfred P. Sloan Foundation.

Alfred P. Sloan Foundation Logo

NEH Logo

The CUNY Graduate Center has directly contributed to the CUNY Academic Commons, housing the project since its inception, and has contributed to CBOX through its GC Digital Initiatives.

CUNY Graduate Center Logo

CUNY Graduate Center Digital Initiatives Logo

Powered by Commons In A Box
css.php
Skip to toolbar
  • About WordPress
    • WordPress.org
    • Documentation
    • Learn WordPress
    • Support
    • Feedback
  • Log In
  • Register