Check if widget has content

Problem solved by this code below:

<?php if (is_active_sidebar('extra_widget_1')) {
     ?>
     <li>
          <?php dynamic_sidebar('extra_widget_1'); ?>
     </li>
 <?php
     }
 ?>

Leave a Comment