php - Unregistering sidebar in child theme with no id -


i have child theme changes parent theme's footer (widget area). copied footer.php , changed include new footer registered/ativated in child's functions.php

i use unregister_sidebar( ' ' ); code remove other sidebars parent.

problem: footer widget area parent defines has no 'id' can't target unregister code. parent side-bar codes follows

function web2feel_widgets_init() {     register_sidebar( array(     'name'          => __( 'sidebar', 'web2feel' ),     'id'            => 'sidebar-1',     'before_widget' => '<aside id="%1$s" class="widget %2$s">',     'after_widget'  => '</aside>',     'before_title'  => '<h1 class="widget-title">',     'after_title'   => '</h1>', ));  register_sidebar(array(     'name' => 'footer',     'before_widget' => '<div class="botwid col-xs-6 col-md-3 %2$s">',     'after_widget' => '</div>',     'before_title' => '<h3 class="bothead">',     'after_title' => '</h3>', ));  } add_action( 'widgets_init', 'web2feel_widgets_init' ); 

i want rid of both back-end. able target first 'sidebar-1' id. can't target other.

how can accomplish this?

interesting question, rather unregister both 1 not have id have tried removing widgets action below?

// unhook default functions function unhook_theme_functions() {     remove_action('widgets_init','web2feel_widgets_init'); } add_action('init','unhook_theme_functions'); 

Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -