I have mainly seen sites using widgets on sidebars or inside multi-column layout. However, I was wondering what if we could use widgets in every blocks like header, main content block, footer etc. Is that a good or a bad idea?
Leave a Reply
You must be logged in to post a comment.
No technical reason why not to do that , as long as you keep the semantic and code all right (meaning a Header HEAD tag with proper content and footer to accommodate script and functions – both not necessarily visual)
I actually think it is a good idea for a theme …Can give a HUGH flexibility for users , although it would make you need to write widgets to contain ALL the functions of WP , like Content , title, comments etc with a lot of options.
At that point, it is becoming almost a FORK of wordpress 🙂 – But again, +1 for the idea !
IMHO, using widgets on all areas is a bad idea. The widgets should be used for their purpose, meaning we should use widgets where there can add/remove content.
I see some people widgetize the area for header, that’s not cool, because in fact you don’t use any widgets more in that area. That breaks the understanding of widgetized area, where we can have many widgets.
Of course that’s not a fixed rule. It depends on the situation. For ex.: we have a front page with some boxes of text. While we (developers) want the client can change the text content of that boxes, using a text widget (thus a widgetized area) is good, though we use only one widget in that area.
So, a good practice is:
– widgetize the area where we want users (clients) change the content easily
– but don’t widgetize the area where it’s nearly fixed (HTML markup or content)
This can be difficult to work with from a dev point of view, so if your selling your theme or in the future having someone else work on it, it won’t use the default structure and semantics of WordPress which I consider bad form. But there is no reason why it can’t have both, meaning if widgets are not used, it falls back into a more normal structure. And also make sure it is well commented;)