Can you have 1 project that does both a WordPress theme and blocks?
or do you have to do them separately?
-sg
Can you have 1 project that does both a WordPress theme and blocks?
or do you have to do them separately?
-sg
I do them together for client sites since the blocks and themes are so intertwined. That said, WordPress suggests keeping the functionality (plugin) and design (theme) separate, so the “correct answer” is to make blocks a separate plugin since they are technically functionality-related.
I can see the value in this since I’m changing the blocks that I deliver much more frequently than the theme itself. From a workflow standpoint, though, keeping them together is just so much easier!
Thank you Adam. Thats the way I do it. But always looking to see if there are better ways o things i am missing.
One of the biggest reasons I haven’t split them is because the theme and blocks share so may styles. For example, my theme defines color, spacing, typography,etc. that apply to both the theme and blocks. I don’t want to recreate all those styles in the block plug-in and referencing styles from one project to use in another hurts my brain (and workflow).
The issue is similar to the struggles I have managing styles from theme.json, with all the duplication of settings and styles that we need for the Pinegrow visual editor vs. the style WordPress generates.