Custom sidebar not showing up
-
Hi there,
I’m using the latest version of this plugin, the latest version of WordPress, and this theme on a staging website: https://www.themezilla.com/themes/viewport/
I’ve set up a custom sidebar to render on a specific page, and it’s not showing up.
I tried deactivating all plugins (except for the Custom Sidebar plugin), and that didn’t work. I tried a live preview of TwentyTwelve and noticed that the sidebar shows up, so this indicates that it’s an issue with this particular theme. Please help! Happy to pass along login details.
Have used this plugin with another theme AND LOVE IT. It’s brilliant.
If it helps, here’s the sidebar code I’m seeing in functions.php:
if ( !function_exists( ‘zilla_sidebars_init’ ) ) {function zilla_sidebars_init() {
register_sidebar(array(
‘name’ => __(‘Main Sidebar’, ‘zilla’),
‘id’ => ‘sidebar-main’,
‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h3 class=”widget-title”>’,
‘after_title’ => ‘</h3>’,
));register_sidebar(array(
‘name’ => __(‘Single Post Sidebar’, ‘zilla’),
‘id’ => ‘sidebar-single’,
‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h3 class=”widget-title”>’,
‘after_title’ => ‘</h3>’,
));register_sidebar(array(
‘name’ => __(‘Page Sidebar’, ‘zilla’),
‘id’ => ‘sidebar-page’,
‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h3 class=”widget-title”>’,
‘after_title’ => ‘</h3>’,
));register_sidebar(array(
‘name’ => __(‘Footer Column 1’, ‘zilla’),
‘id’ => ‘footer1’,
‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h3 class=”widget-title”>’,
‘after_title’ => ‘</h3>’,
));register_sidebar(array(
‘name’ => __(‘Footer Column 2’, ‘zilla’),
‘id’ => ‘footer2’,
‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h3 class=”widget-title”>’,
‘after_title’ => ‘</h3>’,
));register_sidebar(array(
‘name’ => __(‘Footer Column 3’, ‘zilla’),
‘id’ => ‘footer3’,
‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h3 class=”widget-title”>’,
‘after_title’ => ‘</h3>’,
));
}}
add_action( ‘widgets_init’, ‘zilla_sidebars_init’ );Also, here’s the code from sidebar.php:
<?php zilla_sidebar_before(); ?>
<!–BEGIN #sidebar .aside–>
<div id=”sidebar” class=”aside”><?php
zilla_sidebar_start();/* Widgetised Area */
if( is_page() ) {
dynamic_sidebar( ‘sidebar-page’ );
} elseif( is_single() ) {
dynamic_sidebar( ‘sidebar-single’ );
} else {
dynamic_sidebar( ‘sidebar-main’ );
}zilla_sidebar_end();
?><!–END #sidebar .aside–>
</div>
<?php zilla_sidebar_after(); ?>
- The topic ‘Custom sidebar not showing up’ is closed to new replies.