I'm having some trouble with my widgets. I've registered widget areas correctly; as the widgets are showing up in the "Appearance" menu. However widgets aren't showing up in the Customizr section of WP; getting this error:
There are no widget areas currently rendered in the preview. Navigate in the preview to a template that makes use of a widget area in order to access its widgets here.
I've tried the solutions mentioned here: Widgets not displaying in theme customizerWidgets not displaying in theme customizer and here Widgets Section not displaying in theme customizerWidgets Section not displaying in theme customizer but had no luck.
My code is:
register_sidebar(array(
'name' => 'Sidebar Widgets',
'id' => 'sidebar-widgets',
'before_widget' => '<section class="widget">',
'after_widget' => '</section>',
'before_title' => '<h4>',
'after_title' => '</h4>'
));
<?php if ( is_active_sidebar( 'sidebar-widgets' ) ) : ?>
<?php dynamic_sidebar('sidebar-widgets'); ?>
<?php endif; ?>
Running WordPress 4.4.2.
I've tried the following things:
- Tried dynamic_sidebar in different templates (header, front-page, index).
- Tried navigating to different pages as suggested, no luck
- No console errors
- Tried theme on a different WordPress installation, no luck
- Tried another theme, widgets working
Any other code I can add to this question to help troubleshoot?