WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
Widget doesn't validate or follow WP (1 post)

  1. mrwweb
    Member
    Posted 3 years ago #

    The current widget is wrapped in an unordered list on (Line 65 of events-list-widget.class.php):

    <ul class="upcoming">...</ul>

    However, as detailed on http://codex.wordpress.org/Function_Reference/dynamic_sidebar, the best practice for dynamic sidebars is to wrap the entire sidebar in an unordered list and have each widget be a list item like so:

    <ul id="sidebar">
     <?php if ( !dynamic_sidebar() ) : ?>
        <li>{static sidebar item 1}</li>
        <li>{static sidebar item 2}</li>
     <?php endif; ?>
     </ul>

    This means that when using the upcoming events widget, we get the markup:

    <ul>
    <ul class="upcoming">
    ...
    </ul>
    </ul>

    This doesn't validate. The widget should be wrapped in a list item, not an unordered list.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic