One plugin, every brand: How shared code cut costs and simplified work for staff

Whether your organization operated three websites or 30, a common code layer will significantly reduce tech debt. (Photo by Jason Leung on Unsplash)

Run several brand sites long enough and the same feature ends up built three slightly different ways. At Digiday Media, a simple post option like “Hide Title” existed in a different version on each brand. Every fix had to be found, understood and repeated per site.

That repetition had a price. Our development agency billed by the hour, so a change made four times was billed four times. The tech debt grew with every new feature, and so did our expenses.

The cure I’ve used twice is a shared custom network WordPress plugin: one plugin, active on every site, that holds every feature the brands share. I built the first at the Online News Association and the second at Digiday.

It doesn’t require multisite. Digiday’s plugin went live on four separate WordPress installs in February 2022—three months before we consolidated into a multisite network. Starting with the plugin made the later migration smaller.

If you’re interested in multisite, you can learn about my experience in WordPress multisite for a multi-brand publisher

The rule: features in the plugin, looks in the theme

The whole approach rests on one rule. If a feature should behave the same on every brand, it goes in the network plugin. If it’s about how a brand looks, it goes in the theme.

For experienced WordPress professionals, all this might seem very obvious. This describes any plugin, after all. Example: WooCommerce brings the functionality of a store, and the we customize how it appears on our site.

At ONA, the plugin was called “ONA Multisite Basics,” activated network-wide for “basic functions that will assist in using ONA multisite.” At Digiday, “Digiday Media Network” did the same job across four editorial brands: Digiday, Glossy, Modern Retail and WorkLife.

The themes still mattered. But once shared behavior lived in the plugin, the themes got thinner, and standardizing them toward a shared structure became realistic.

A shared experience for all staff

The cost savings were only half the payoff. The plugin is also where we standardized how the sites work for the people inside them—which led to time savings.

Few staffers focus on one brand. Editors fill in across publications. The awards team builds pages on all sites, and marketing places promos on all of them. When each site had its own fields, blocks and quirks, every switch meant a mental shift. It was confusing and tiring.

With shared features, the same post options, blocks and workflows appeared on every site. It eased training as well—one set of documentation covered them all; onboarding was for the whole network; and anyone could answer questions.

Ways to use a shared custom plugin

Here are examples of items included in one or both plugins:

  • Network identity. A shared “topline” nav bar linked every ONA property and the member portal, so eight-plus sites read as one organization. A branded login screen and a rule hiding the admin bar from members rounded it out.
  • Developer guardrails. Local and staging copies of each site got adjusted colors and favicons, so nobody edited production by mistake.
  • AMP logic. We centralized the code behind AMP pages so all four sites had near-identical structure. One file change now fixed all four.
  • Shared post options. At Digiday, fields like “Hide Title” and “Long Article Section Title” had drifted into three slightly different versions. We standardized each one network-wide.
  • Shared blocks. A Special Features block built for one homepage doubled as an event promo on other brands.
  • Features that ship once. In September 2023, lead video went live on every Digiday Media site in a single release. We also standardized code for custom post types and custom taxonomies.
  • Feature toggles. A settings page let each site switch on features. At ONA these included Viafoura comments, Intercom and Guidebook. The code shipped everywhere; each site opted in when it was ready or needed.
  • Permissions fixes. On multisite, only super admins get the unfiltered_html capability by default. The ONA plugin restored it for editors and site admins network-wide, while the Digiday plugin took a different approach with custom blocks.
  • Per-site configuration in one place. Analytics IDs and ad slots for every site lived in the plugin, keyed to each site’s URL. One file showed what every property was tracking.

Lessons from building two of them

  1. Start before you consolidate. The plugin works on separate installs. Every feature you move into it now is custom code you won’t have to untangle during a migration.
  2. Put per-site settings in a settings screen. At ONA, analytics IDs and ad slots were hard-coded and keyed to each site’s URL. That works until a domain changes or a new conference site launches. Options a site admin can edit age better.
  3. Make new features opt-in. Toggles let one brand adopt a feature without forcing it on the others, and let you roll out to one site before all of them.
  4. Load it everywhere, including admin screens. At Digiday, new users couldn’t accept invitations until the plugin was forced to load on every admin page. Finding that took a lot of trial and error.
  5. Standardize as you go. Each time we touched a feature, we pulled its drifted versions into one. In one September 2023 release alone, we standardized two post options network-wide, removed deprecated fields, and replaced a custom “article template” field with WordPress’s native Page Template option.

A tech note: Since we also used multisite, the plugin code existed in the same Git repo as the themes, etc. We didn’t have to deal with a sub-repo or installing updates for our own plugin. If your sites are separate WordPress installs, it would be a bit more complicated.

Where to start

Pick the one feature your brands have each built differently and move it into a new network plugin. Then keep going, one feature at a time. When you’re ready to put the sites themselves under one roof, read WordPress multisite for a multi-brand publisher for what to expect in the migration.