My plugin creates custom widgets, How can I programatically add them to existing sidebar widget areas?
Sidebars are registered in the option ‘sidebars_widgets’. To see what’s in and what not, try this: add_action( ‘wp_footer’, ‘show_my_sidebars’ ); function show_my_sidebars() { $sw = get_option( ‘sidebars_widgets’ ); print ‘<pre>’ . htmlspecialchars( print_r( $sw, TRUE ) ) . ‘</pre>’; } Sample output: Array ( [sidebar-footer-left] => Array ( [0] => archives-3 ) [sidebar-footer-right] => Array … Read more