WordPress.org

Forums

WP PHP widget
Can't validate xhtml (2 posts)

  1. Jay
    Member
    Posted 4 years ago #

    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/

  2. webmystery
    Member
    Posted 4 years ago #

    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).

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP PHP widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic