I am about ready to pull some hair out in regards to the dynamic_sidebar function, called to stick in a dynamic sidebar. With one of my sidebars, I only want a layer to appear if the sidebar actually has some widgets defined.
However, with the typical code that one uses for sticking in the sidebar, it only gives the option for what to output if there are no widgets defined.
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Main Sidebar (Left)') ) : ?>
I have been trying to rewrite it so that dynamic_sidebar is not called directly, but no matter what I do, whether assign the output to a variable or whatever, it seems to simply throw out its code anyway, regardless of what I want to do with it.
Can anyone provide any more details on how this function works, and how I can work with it? Thanks!!