inconsistent widget markup
-
what would be the best way to standardize the markup of different widgets?
even when using the register_sidebars function, widgets still tend to output wildly differing markup… some just put the widget content in a div, some still wrap the title in <h2> even though the register_sidebars function clearly removes them, sometimes the whole widget is wrapped in a div… I don’t know, but somehow it drives me crazy.
so, how would you go about making the markup consistent?
so far, I’ve only found three ways but they’re all… lacking to say the least:
1. fiddle around in each widget’s php code and make the relevant changes. unfortunately, every time there’s a new version of the widget, it’ll overwrite all your changes and you’ll have to do it again.
2. leave the markup and style each widget specifically. this approach should be version-proof, but gets you redundant css and just basically is quite a mess imho.
3. use output buffering and write a function that strips all or most tags from each widget, generate your own widget markup and output it. makes for (mostly) consistent markup and tidy css, but is (I think) quite a lot of work.
is there any plugin that helps with this issue?
how do you guys approach this?
- The topic ‘inconsistent widget markup’ is closed to new replies.