Title: [Plugin: WP PHP widget] Can&#039;t validate xhtml
Last modified: August 19, 2016

---

# [Plugin: WP PHP widget] Can't validate xhtml

 *  [Jay](https://wordpress.org/support/users/jaymyers/)
 * (@jaymyers)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-wp-php-widget-cant-validate-xhtml/)
 * When I enter`<?php thesis_widget_recent_posts('', 'Recent Articles', '10'); ?
   >` I am unable to validate on w3.org. I get this error
 * > Line 337, Column 80: document type does not allow element “li” here; missing
   > one of “ul”, “ol” start-tag
   >  </div><div class=”widget”> <div class=”textwidget”> <li class=”widget”>
 * What can I do about this? I also run `<p>Copyright&copy; 2003&ndash;<?php echo
   date('Y'); ?></p>` in another instance of the widget and it runs fine and validates.
   So I am not sure where to go from there.
 * [http://wordpress.org/extend/plugins/wp-php-widget/](http://wordpress.org/extend/plugins/wp-php-widget/)

Viewing 1 replies (of 1 total)

 *  [webmystery](https://wordpress.org/support/users/webmystery/)
 * (@webmystery)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-wp-php-widget-cant-validate-xhtml/#post-1791074)
 * Why use the php widget to load another widget? Can you load the thesis recent
   post widget all by itself? Is it missing the ol/ul tag when loaded in the sidebar
   directly?
 * Are you calling these in the same sidebar? If you can find the code that registers
   that sidebar there could be something missing from the ‘before widget’ command(
   see [http://codex.wordpress.org/Function_Reference/register_sidebar](http://codex.wordpress.org/Function_Reference/register_sidebar)).
 * My guess is that the problem doesn’t have anything specifically to do with the
   php widget, but by loading a widget from a widget you are either bypassing some
   code in the theses theme that generates the proper list, or simply mixing tags
   in the wrong order by nesting your widgets.

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: WP PHP widget] Can't validate xhtml’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-php-widget.svg)
 * [WP PHP widget](https://wordpress.org/plugins/wp-php-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-php-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-php-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-php-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-php-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-php-widget/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [webmystery](https://wordpress.org/support/users/webmystery/)
 * Last activity: [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-wp-php-widget-cant-validate-xhtml/#post-1791074)
 * Status: not resolved