Disable customizer control sorting within sections

What you have in the code is Backbone.js that goes together with Underscore.js. The api.panel, api.section, api.control are collections $( [ api.panel, api.section, api.control ] ).each( function ( i, values ) { var debouncedReflowPaneContents = _.debounce( api.reflowPaneContents, api.settings.timeouts.reflowPaneContents ); values.bind( ‘add’, debouncedReflowPaneContents ); values.bind( ‘change’, debouncedReflowPaneContents ); values.bind( ‘remove’, debouncedReflowPaneContents ); } ); And bind … Read more

Add Control in Widgets Sub-Panel in Customizer

Turns out the section would be addressed with ‘section’ => ‘sidebar-widgets-top-widget-area’ … so you need the sidebar-widgets- in front of the widget area name. However, since it is the widgets panel, everything except the widget areas active on the page your are at are set to display: none; and need to be set to: display: … Read more

Force update widget customizer using js

Widgets in core presently do not make this easy. Please read Live Widget Previews: Widget Management in the Customizer in WordPress 3.9, and in particular the section “No more Update button (usually)”: Widget forms on the admin page have a familiar Save button. In previous versions of Widget Customizer, we adapted the Save button to … Read more

Use Custiomizer to setup meta theme color tag

Depending on whether you store your customizer settings as mods or options (which you define with the type parameter when adding a setting) you can simply use get_option or get_theme_mod in your header.php like this: echo ‘<meta name=”theme-color” content=”‘ . get_theme_mod(‘my_browser_bar_color’,’#000000′) . ‘”>’; This line tells to look for the mod and if it isn’t … Read more

WordPress Customazation API section in section

That is a Panel, the customizer contains three layers: panels contain sections, sections contain settings, and settings are the data that gets managed by the controls in the customizer UI. [panel] |–[section] | |–[setting] and his [control] | |–[setting] and his [control] |–[section] | |–[setting] and his [control] | |–[setting] and his [control] Panel, Section, … Read more

WordPress Customizer Not Setting Custom Settings or Controls

The section you created ‘Social Media Icons’ doesn’t show because is empty it doesn’t have any control, this is because you didn’t set the correct ID in the control arguments, it should be like this in socialcustomizersection.php: // control $wp_customize->add_control( $social_site, array( ‘type’ => ‘url’, ‘label’ => $label, ‘section’ => ‘ct_alter_social_array_filter’, //it should be the … Read more

Use the customiser to set the background-image of a div

Figured it out: Firstly there is a spelling mistake in that i’m using ‘post-box-image’ instead of ‘post_box_image’… Secondly it’s better to do it this way in functions.php: function jhwd_blog_theme_customize_css() { ?> <style type=”text/css”> .post-block { background-image:url(‘<?php echo get_theme_mod( ‘post_box_image’ );?>’); background-color: <?php echo get_theme_mod( ‘post_box_color’ );?>; } .post-block>h1, .post-boxes { background-color: <?php echo get_theme_mod( ‘post_boxes_items_color’ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)