How do I stop Ocean WP from overriding child theme widget?
-
I’m using a child theme of Ocean WP and registered four widgets in the child theme’s functions.php file. Everything worked fine until the most recent parent theme update, which is replacing the second widget with “left sidebar.”
I found the offending section of the parent theme’s functions.php and commented out:
register_sidebar( array( 'name' => esc_html__( 'Left Sidebar', 'oceanwp' ), 'id' => 'sidebar-2', 'description' => esc_html__( 'Widgets in this area are used in the left sidebar region.', 'oceanwp' ), 'before_widget' => '<div class="sidebar-box %2$s clr">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>', ) );
Obviously, this doesn’t follow best practices. I assume I need to de-register the left sidebar in my child theme’s functions.php file but am not very familiar with php yet. What do I need to do to prevent the left sidebar from overriding my widget, in a way that conforms to best practices?
Thanks!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How do I stop Ocean WP from overriding child theme widget?’ is closed to new replies.