function widget($args, $instance)
        {
            extract($args);
            $title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
            echo $before_widget;
            if ($title) {
                echo $before_title . $title . $after_title;
            }
            // Fetch sponsors
            $terms = wcb_get_option('sponsor_level_order');
            foreach ($terms as $term) {
                $sponsors = wcb_sponsor_query(array('taxonomy' => $term->taxonomy, 'term' => $term->slug));
                if (!wcb_have_sponsors()) {
                    continue;
                }
                // Open sponsor level
                ?>
			<div <?php 
                wcb_sponsor_level_class($term);
                ?>
>
			<h4 class="sponsor-level-title"><?php 
                echo esc_html($term->name);
                ?>
</h4><?php 
                while (wcb_have_sponsors()) {
                    wcb_the_sponsor();
                    ?>
<a class="sponsor-logo" href="<?php 
                    the_permalink();
                    ?>
" title="<?php 
                    printf(esc_attr__('Permalink to %s', 'wordcampbase'), the_title_attribute('echo=0'));
                    ?>
" rel="bookmark"><?php 
                    if (has_post_thumbnail()) {
                        the_post_thumbnail();
                    } else {
                        the_title();
                    }
                    ?>
</a><?php 
                }
                // Close sponsor level.
                ?>
			</div><?php 
            }
            echo $after_widget;
        }
    $sponsors = wcb_sponsor_query(array('taxonomy' => $term->taxonomy, 'term' => $term->slug));
    if (!wcb_have_sponsors()) {
        continue;
    }
    // Open sponsor level
    ?>
					<div <?php 
    wcb_sponsor_level_class($term);
    ?>
>
					<h2 class="sponsor-level-title"><?php 
    echo esc_html($term->name);
    ?>
</h2><?php 
    while (wcb_have_sponsors()) {
        wcb_the_sponsor();
        ?>
						<div id="post-<?php 
        the_ID();
        ?>
" <?php 
        post_class('sponsor');
        ?>
>
							<h3 class="entry-title sponsor-title"><a href="<?php 
        the_permalink();
        ?>
" title="<?php 
        printf(esc_attr__('Permalink to %s', 'wordcampbase'), the_title_attribute('echo=0'));
        ?>
" rel="bookmark"><?php