Cant activate sidebar for my theme
-
Hey,
I’m using multiple themes within my wordpress instance and I’m handling the themes with the “jonradio Multiple Themes”-plugin. However, in one of that themes I cant get enabled the sidebar. In functions.php there is
function twentythirteen_widgets_init() { register_sidebar( array( 'name' => __( 'Main Widget Area', 'twentythirteen' ), 'id' => 'sidebar-1', 'description' => __( 'Appears in the footer section of the site.', 'twentythirteen' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); register_sidebar( array( 'name' => __( 'Secondary Widget Area', 'twentythirteen' ), 'id' => 'sidebar-2', 'description' => __( 'Appears on posts and pages in the sidebar.', 'twentythirteen' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); } add_action( 'widgets_init', 'twentythirteen_widgets_init' );and also in the templates there is <?php get_sidebar(); ?>.
I cant select widgets for my sidebar (which is also not rendered) under theme options –> customize (wp-admin/customize.php?theme=foo-bar) because the “Appearance” Option is missing. When I activate another theme, the option is present and I can select widgets for the sidebar.
Can anyone help me?
Best,
exchentrix
-
Can you try changing the
nameto something likename=>'Widget Name',? That works for me.Nope, unfortunately, this doesnt solve the problem. :/ Have you any other suggestions?
Sorry. I forgot to include the description as well. Can you try to simply set it as
'description' => 'description here',Thanks for your advice, but that doesnt solve the problem. 🙁
The topic ‘Cant activate sidebar for my theme’ is closed to new replies.