Having trouble validating sidebar if no widgets are on
-
https://lunaz.homelinux.net/~wpdemo/
I’m trying to get valid xhtml 1.0 strict as much as possible, and it’s working right with widgets turned on, but if no widgets, I get errors.
I read somewhere on here to put a UL tag outside everything to get the widgets to validate, that worked.
Now turning off widgets I get:
Error Line 222, Column 4: document type does not allow element "h2" here; assuming missing "li" start-tag <h2>Archives</h2> Error Line 241, Column 5: end tag for "li" omitted, but OMITTAG NO was specified </ul></div> You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">". Info Line 222, Column 1: start tag was here
Here’s my sidebar.php
<ul class="ul-wrapper"> <?php if ( function_exists('dynamic_sidebar') && function_exists('wp_nav_menu') && dynamic_sidebar(1) ) : else : ?> <h2>Archives</h2> <ul class="li_archives"> <?php wp_get_archives('type=monthly'); ?> </ul> <h2>Meta</h2> <ul class="li_reg"> <li><?php wp_register(); ?></li> </ul> <ul class="li_loginout"> <li><?php wp_loginout(); ?></li> </ul> <?php endif; ?> </ul>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Having trouble validating sidebar if no widgets are on’ is closed to new replies.