Understanding How Simple Custom CSS and JS Works with WordPress Multisite
Content
Many WordPress users running a Multisite network turn to the 'Simple Custom CSS and JS' plugin for adding custom code. However, its behavior in a Multisite environment can be a common source of confusion. This guide explains how the plugin works with Multisite and clarifies its capabilities and limitations.
The Core Multisite Functionality
Based on community reports and developer responses, the plugin is indeed Multisite compatible. It can be network-activated, allowing it to be available on every subsite within your network. This is a fundamental requirement for any plugin used in a Multisite setup.
Resolving Initial Multisite Activation Issues
Some users initially reported that the plugin did not work correctly on subsites. For example, code would work on the primary site (e.g., somesite.com) but not on a secondary site (e.g., somesite.com/secondsite). This was a confirmed bug in earlier versions of the plugin.
Solution: This specific issue was resolved in version 2.1 of the plugin. If you are experiencing this problem, the first and most critical step is to ensure your plugin is updated to the latest version. This has resolved the issue for many users.
The Key Limitation: Code Sharing
The most significant point of confusion surrounds code management. Unlike some other Multisite plugins, 'Simple Custom CSS and JS' treats each subsite as an entirely separate entity for code creation and management.
- How it Works: When you create a CSS, JS, or HTML code snippet on one subsite, it is only available and active on that specific subsite.
- The Limitation: There is no built-in functionality to share a single code snippet across multiple or all subsites in your network. You cannot create a code block in the network admin that applies everywhere.
- Workaround: To apply the same code on multiple subsites, you must manually recreate the same code snippet on each individual subsite where you want it to appear.
The plugin's developer has acknowledged user requests for a network-wide code sharing feature but has not implemented it as of the time of writing. This is an important consideration when deciding if this plugin fits your specific Multisite workflow.
Summary and Best Practices
- Ensure Compatibility: Confirm the plugin is network-activated.
- Update the Plugin: Always run the latest version (2.1 or newer) to avoid past Multisite bugs.
- Understand Code Management: Plan to manage code snippets on a per-subsite basis, as they cannot be shared network-wide.
By understanding these behaviors, you can effectively set up and use 'Simple Custom CSS and JS' within your WordPress Multisite network.
Related Support Threads Support
-
Is this plugin MultiSite Compatible?https://wordpress.org/support/topic/is-this-plugin-multisite-compatible-31/
-
Doesn't work with multisite setupshttps://wordpress.org/support/topic/doesnt-work-with-multisite-setups/
-
Share code across multisite?https://wordpress.org/support/topic/share-code-across-multisite/
-
Multisitehttps://wordpress.org/support/topic/multisite-421/
-
Subdomains of multisite treated as separate sites?https://wordpress.org/support/topic/subdomains-of-multisite-treated-as-separate-sites/