Using a loop to build and update widgets

I am not sure I followed your code correctly, but you could try to set all data into one array: name=”unique_widget_name[<?php echo $this->get_field_name($i); ?>][‘name’]” Very similar question, but not identical: How to store widget fields data as an array?

How to add button to top of theme customizer?

If you take a look at the source code of this part … do_action( ‘customize_controls_print_styles’ ); do_action( ‘customize_controls_print_scripts’ ); ?> </head> <body class=”<?php echo esc_attr( $body_class ); ?>”> <div class=”wp-full-overlay expanded”> <form id=”customize-controls” class=”wrap wp-full-overlay-sidebar”> <div id=”customize-header-actions” class=”wp-full-overlay-header”> <?php $save_text = $wp_customize->is_theme_active() ? __( ‘Save &amp; Publish’ ) : __( ‘Save &amp; Activate’ ); submit_button( … Read more