title: Show active sidebar in Wordpress
body: <p>So I'm trying to not show a side bar if it there are no widgets to show</p>
  
  <p>when I use the <code>is_active_sidebar()</code> function it always returns false and the if statement doesn't work and when I try to use the <code>is_dynamic_sidebar()</code> function it always returns true.</p>
  
  <p>I have the widget logic plugin installed so some of the widgets show up on a page and some pages don't have a widget.</p>
  
  <p>This is my code:</p>
  
  <pre><code>        &lt;div class="row main-row"&gt;
          &lt;?php if (is_dynamic_sidebar('left_bar')) { ?&gt;
              &lt;div class="col-md-3 left-sidebar"&gt;
                  &lt;?php
                  dynamic_sidebar('left_bar');
                  ?&gt;
              &lt;/div&gt;
  
              &lt;div class="col-md-9 main-content"&gt;
                  &lt;?php the_content('Read More'); ?&gt;
              &lt;/div&gt;
          &lt;?php } else { ?&gt;
              &lt;div class="col-md-12 main-content"&gt;
                  &lt;?php the_content('Read More'); ?&gt;
              &lt;/div&gt;
          &lt;?php } ?&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>Any Ideas on what should I do?</p>