Joy
(@joyously)
If you define a widget area, it can accept any widgets.
The theme should let the user put what they want in the page, and just focus on the getting all the pieces (header, content, footer, sidebar) where they go.
Especially with the block editor, but with other plugins that are page builders, there are many options for the user to get pages the way they want. The theme’s job is consistency across the site, not individual pages. The theme should not lock the user into using it (for the home page, for instance), and can be switched at any time, even programmatically on each page (theme switcher plugins).
I agree with Joy in general that themes are not meant to constrain users, something theme developers should always keep in mind. But when it comes to developing a specific site for a client who is not very tech savvy but needs the ability to edit certain page elements without any chance of them corrupting the overall layout, some site specific measures are required that are contrary to this ideal.
WP is at a juncture with the implementation of the new block editor. It’s now possible to develop custom blocks that allow for altering content without corrupting other related elements. Short of completely removing or moving the entire block, the UI could be made “idiot user proof”.
What was done before the block editor, and still may be done now, is defining custom fields for each element that may need editing on a page. The default custom field UI leaves much to be desired, it’s far from “user proof”. To account for this, custom meta boxes can be defined that collect information from the user in a specific manner that is difficult to get wrong.
It can be very time consuming developing custom UIs. Many devs rely upon a custom field plugin of some sort to help them easily and quickly define a structured UI. Advanced Custom Fields is a popular choice among several similar plugins.
Many thanks for the above responses. I’ve had a quick look and it does appear that custom fields is what I am looking for and the Advanced Custom Fields plugin in particular warrants further investigation. I’ve also looked at the Elementor page builder which seems amazingly powerful, and the Pro version has Role Manager functioanlity which allows users to amend content but prevents them from adding new elements willy-nilly (which ultimately I will have to fix when they break or abuse the layout). I’m just concerned about the overheads of running such an extensive plugin and need to investigate properly whether the code it generates is clean. But certainly I have some food for thought now.