Multiple instances of Acorn?

Hello!

After a considerable break from the world of WordPress, I’m attempting to wrap my head around all the changes in the ecosystem :exploding_head: I’m glad to see the Roots team has been very busy :star_struck: It’s hard to imagine doing any WP development without Roots, at least while keeping my sanity…

Anyway, I’ve been going through the documentation for Acorn and one thing I’m struggling to figure out is how it might be used in both Sage and another plugin, specifically a “site” mu-plugin.

For many years, I’ve created a separate mu-plugin that handles the core features of the site (custom post types, shortcodes, Elementor overrides + widgets etc…). This has always seemed like The Right WayTM to approach things because the site shouldn’t break, nor should content disappear if you need to change the theme. However, in practice, the separation isn’t always so clean…

Ideally, in my site plugin, I’d like to take advantage of the Acorn features, especially Blade.

My question: is it possible / recommended to have more than one instance of Acorn: one for the theme and one for the site plugin? If possible, the mu-plugin would be self-contained in terms of the Blade templates but it would be great if the theme could optionally override these templates from its own local views folder.

Hopefully that all makes sense — I’m interested to hear how others approach this. I do wonder if I’m over-complicating my life, because a highly customised theme built on Sage is not something that would normally be changed unless the site is being redone. I’m open to all thoughts on the subject…

Bonus question: how do you normally handle custom post types? I like the simplicity of Poet but the way it is locked to the theme makes me hesitate a bit.

Thanks for reading! :wave:

1 Like