WordPress Hide Widget If $_Session Is Active?

The easiest way to do this is via dynamic_sidebar()

<?php
if ($a == $b)  // Your $_SESSION stuff
  dynamic_sidebar( 'Right Sidebar' );
?>

Any widgets contained in the “Right Sidebar” will now be loaded based on your condition. You should use this with register_sidebar()

http://codex.wordpress.org/Function_Reference/dynamic_sidebar

tech