Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I like to use a child-theme.

The parent functions.php

function starkers_widgets_init() {
// Area 1, located at the top of the sidebar.
register_sidebar( array(
    'name' => __( 'Primary Widget Area', 'starkers' ),
    'id' => 'primary-widget-area',
    'description' => __( 'The primary widget area', 'starkers' ),
    'before_widget' => '<li>',
    'after_widget' => '</li>',
    'before_title' => '<h3>',
    'after_title' => '</h3>',
) );

// Area 2 ...

My child-theme functions.php

function xtreme_unregister_sidebar() {
    unregister_sidebar('primary-widget-area');
    }
    add_action( 'childtheme_sidebars', 'xtreme_unregister_sidebar' );

But doesn´t work for.
Thanks

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Check the code bellow, I think that should work.

add_action( ‘after_setup_theme’, ‘remove_default_sidebars’, 11 );
function remove_default_sidebars(){
remove_action( ‘widgets_init’, ‘starkers_widgets_init’ );
}
share|improve this answer
    
WOW, works too, thanks a lot. –  ogni Apr 22 '12 at 17:21
    
I just edit the quotes // Remove all widgets from Starkers-Theme add_action( 'after_setup_theme', 'remove_default_sidebars', 11 ); function remove_default_sidebars(){ remove_action( 'widgets_init', 'starkers_widgets_init' ); } –  ogni Apr 22 '12 at 17:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.