• Resolved madsrh123

    (@madsrh123)


    I’m creating a twentytwelve child theme. Is there a way to rename (change the ID) of the default twentytwelve sidebars? I could add three new ones and don’t use the other ones, but I’d rather just change the names.

    This is the begining of the code from twentytwelve functions.php:

    function twentytwelve_widgets_init() {
    	register_sidebar( array(
    		'name' => __( 'Main Sidebar', 'twentytwelve' ),
    		'id' => 'sidebar-1',...

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    You could alter the values in the global $wp_registered_sidebars, but that is a rather hacky approach. The proper approach would be to unregister the sidebars you do not use and register your own.

    Thread Starter madsrh123

    (@madsrh123)

    I really thought that it would be less hacky to modify the core sidebars, but you’re right, registering my own is probably the way to go – thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Rename sidebar widgets’ is closed to new replies.