Forums

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

  1. emwp
    Member
    Posted 11 months 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 (@dd32)
    WordPress Dev
    Posted 11 months 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
    Member
    Posted 11 months ago #

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

Reply

You must log in to post.

About this Topic

Tags