[resolved] Twentyeleven @ 18335 missing sidebar call. (3 posts)

  1. emwp
    Posted 5 years ago #

    twentyeleven/sidebar.php @ 18335

    There is no call to dynamic_sidebar( 'sidebar-1' ) after the endif

    as if it's missing

    or the team forgot ?

  2. Dion Hulse
    Lead Developer
    Posted 5 years ago #

    The call to dynamic_sidebar() is in the opening if statement:
    <?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?>

    The logic is, if dynamic_sidebar() outputs something, it returns true, causing the contents of the if not to be executed. If it doesn't display anything (ie. no widgets) then it returns false, and as such, the contents of the if are displayed.

  3. emwp
    Posted 5 years ago #

    Hi Dion Hulse, thanks a million for taking a time to explain.

Topic Closed

This topic has been closed to new replies.

About this Topic