• I need the code to detect if a widget is in a sidebar or not the code to detect sidebars is:

    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebarPageInnerRight') ) : ?>
     I NEED CODE HERE TO DETECT A WIDGET
    <td id="right-inner">
    </td>
    <?php endif; ?>

    Is it possible to add code to the noted section above to determine whether a widget has been placed onto the sidebar in the Widgets section of WordPress?

    The reason I need this is so the <td> column won’t take the space if there are no widgets loaded into the sidebar.

    Thanks for your help.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Code to Detect Widgets in Sidebar’ is closed to new replies.