Do you have any initial ideas as to why custom sidebars would stop displaying in a Wordpress theme after update 4.4? Our login/join page showed a custom sidebar with the login/join form on the right of the page and other up until the update. This is not a custom sidebar plugin, it's part of the theme. Any thoughts? MANY thanks!
The default sidebar can be enabled, but any custom created sidebars are rendered blank.
Code registering the sidebar within functions.php:include('includes/sidebar/sidebar.php');
Code within sidebar.php:include('functions/custom-sidebars.php');
Full code from custom-sidebars.php:
`//// GETS OUR CUSTOM SIDEBARS
$sidebars = get_option('dd_custom_sidebars');
//// IF THEY EXIST
if($sidebars) {
//// LOOPS AND REGISTERS THEM
foreach($sidebars as $sidebar) {
$args = array(
'name' => $sidebar.' — Custom',
'id' => us_get_sidebar_id($sidebar),
'description' => $sidebar.' — Custom Sidebar',
'before_widget' => '<div class="sidebar-item">',
'after_widget' => '</div>',
'before_title' => '<h4>',
'after_title' => '</h4>',
);
//// REGISTERS IT
register_sidebar($args);
}
}
/// FUNCTION TO GENERATE OUR FRIENDLY NAME
function us_get_sidebar_id($phrase) {
$result = strtolower($phrase);
$result = preg_replace("/[^a-z0-9\s-]/", "", $result);
$result = trim(preg_replace("/[\s-]+/", " ", $result));
$result = trim(substr($result, 0, 20));
$result = preg_replace("/\s/", "-", $result);
return $result;
}`