yesterday I found out, that wordpress uses in some functions tags which force the designer to use mandatory style elements.
get_links_list(), used e.g. in my Sidebar, the return value is wrapped in
<li></li>tags, which forces the designer to use
<ol>for the sidebar. I prefer
<fieldset>to group my sidebar-items.
I changed the function not to return the
<li></li>wrapper around the returned
It is bad for a theme, when return values expect to be in a special environment as
One problem with changing the functions behaviour is, that old themes will break. On the other hand it gives the designer more flexibility to format his theme.
get_links_list() is not the only function that return a
<li></li>wrapper around the returned code.
Some functions even have ‘hard’ coded styles for headers for lists as
I would suggest to clean the wordpress code, so that no styles are hard coded to wordpress functions. Functions that return a list should be changed to accept a parameter as how to format the header of that list(e.g.
<legend>), possibly with a default value when no parameter is given.
- The topic ‘Mixed code an style in WordPress forces Theme-Layout’ is closed to new replies.