WordPress 4.4 Sidebar Naming

With WordPress 4.4 rolling out a few issues have come up around sidebars and widgets but one fix is not immediately obvious. When adding a sidebar, the naming previously was not case sensitive but it is now. The example below would not work:

 register_sidebar(array(
 'name'=>'Homepage Widget',
 'description' => 'Main Area on the Homepage',
 'id' => 'homepage',
 'before_widget' => '',
 'after_widget' => '',
 ));
<?php if (!dynamic_sidebar('HomePage')) : ?>
<?php endif; ?>

Now, make sure that the sidebar call uses the exact ID.

<?php if (!dynamic_sidebar('homepage')) : ?>
<?php endif; ?>

Leave a Reply

Your email address will not be published. Required fields are marked *