Enabling Default Widgets in a Custom Theme

that’s not the way, wp_register_sidebar_widget is used to create widgets. if you want your sidebar to display widgets by default use [dynamic_sidebar()][1] in your theme eg from the 2010 theme: <div id=”primary” class=”widget-area” role=”complementary”> <ul class=”xoxo”> <?php /* When we call the dynamic_sidebar() function, it’ll spit out * the widgets for that widget area. If … Read more

Changing the entire control choices using wp.customize with JavaScript

You’re close. You just need to replace changeTheChoices() with set() as this is a method on wp.customize.Setting. See the following which also refactors a bit: wp.customize( ‘setting_category’, ‘setting_font’, function( categorySetting, fontSetting ) { categorySetting.bind( function( category ) { var newChoices = {}; // get new data from JSON using ‘category’ and populate the ‘newChoices’ fontSetting.set( … Read more

Hard-coded Audio Player

I would recommend that you have your theme require the wordpress.org version of the wpaudioplayer plugin. There is a great article about having themes check for and require plugins. As is well-argued on this WPSE answer, it’s not a great idea to take code from a plugin and include it in your theme because you … Read more

Select menu on browser resize

I think the plugin you mention is the one I wrote so if you’re looking for answer on how to do it take a look at the code. http://wordpress.org/extend/plugins/dropdown-menus/ Essentially all I did was create a custom menu walker class so I could output the menus created in the backend as a dropdown. If it … Read more

Should use widgets in this case?

The general concept on dynamic sidebars Basically WP loops through the global $wp_registered_widgets and builds the widget depending on it’s arguments. You can intercept them easily: Use a filter You can use the dynamic_sidebar_params to add a class to target specific widgets: // SHOW the params for better insights function wpse44903_dump_sidebar_params( $params ) { echo … Read more