Forum Replies Created

Viewing 61 replies (of 61 total)
  • Thread Starter reddo

    (@reddo)

    Seems like no one cares enough to give me an answer. I’ve found a workaround this BUG, but it’s not as elegant as I’d wished.

    It looks like the is_active_sidebar() function works as expected ONLY in sidebar-***.php or sidebar.php and only before calling dynamic_sidebar(). After that it just returns true no matter what.

    This is how i got it to work:

    <?php
    $ltActive = is_active_sidebar('lt');
    $rtActive = is_active_sidebar('rt');
    
    if($ltActive && $rtActive){
      $class = 'grid_6';
    
    }elseif(!$ltActive && !$rtActive){
      $class = 'grid_12';
    
    }else{
      $class = 'grid_9';
    }
    ?>
    <?php if( is_active_sidebar(lt)) : ?>
      <div class="grid_3 left eqh">
    <?php dynamic_sidebar(lt); ?>
      </div><!-- grid_3 -->
    <?php endif; ?>
    
    <div class="<?php echo $class; ?> eqh">

    Thanks for all the help I didn’t get.

Viewing 61 replies (of 61 total)