Hi,
I am also trying to use the script but it works for me as the regular one.
Here’s my code:
functions.php
function is_sidebar_active( $index = 1){
$sidebars = wp_get_sidebars_widgets();
$key = (string) 'sidebar-'.$index;
return (isset($sidebars[$key]));
}
sidebar.php
<?php if ( function_exists('dynamic_sidebar') && is_sidebar_active() ) { // there are active widgets for this sidebar
echo '<div class="widgetarea"><ul id="sidebarwidgeted">' . "\n";
dynamic_sidebar(1);
echo '</ul></div>';
} ?>
It works same as default widget caller – it leaves blank frame if I remove all widgets from sidebar.
Any suggestions?
Thanks in any case 🙂