Support » Alpha/Beta/RC » Twentyeleven @ 18335 missing sidebar call.

  • Resolved emwp

    (@emwp)


    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 ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Dion Hulse

    (@dd32)

    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.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Twentyeleven @ 18335 missing sidebar call.’ is closed to new replies.