<?php if (is_active_sidebar('sidebar-1')) : ?>
    <?php dynamic_sidebar('sidebar-1'); ?>
<?php endif; ?>

<!-- Sidebar Ad -->
<?php 
$sidebar_ad = get_option('pulsegrid_sidebar_ad', '');
if (!empty($sidebar_ad)) : 
?>
<div class="sidebar-widget sidebar-ad-widget">
    <h3 class="widget-title">Publicidad</h3>
    <?php echo $sidebar_ad; ?>
</div>
<?php endif; ?>
