Custom Dynamic Sidebar Not Displaying in Widget Area
-
I am adding a new sidebar to my site to appear on blog single posts. I have followed the Sidebars Doc and have it working without any problems on my test site.
The trouble is that once I move it to the live site, the Sidebar does not appear in the Admin Widgets area to add widgets. Below is the function in my child-theme’s functions.php.
I can’t find any reason why wouldn’t be working, and the only difference between my test and live site would be caching with Autoptimize and W3 Total Cache. But even when clearing their caches nothing changes.
function register_new_sidebar() { register_sidebar( array( 'name' => esc_html__('Article Sidebar', 'child-theme'), 'id' => 'new-article-sidebar', 'class' => 'article-sidebar', 'description' => esc_html__('Sidebar appearing on blog post page.'), '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', 'register_new_sidebar' );
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Custom Dynamic Sidebar Not Displaying in Widget Area’ is closed to new replies.