theme-customizer is a set of classes introduced in 3.4 for customizing themes using a live ajax preview. Theme developers can use these classes for theme options.

learn more… | top users | synonyms

18
votes
4answers
3k views

How To extend WP_Customize_Control

I'm looking for a way to add a new kind of control to the customize live preview panel. I have seen how to add new sections to the panel using add_action( 'customize_register'... The control I want ...
12
votes
2answers
735 views

Settings API vs Theme Customizer

When would it be appropriate to use the settings API, and when would it be better to use the theme customizer? Having Googled around all morning, I haven't been able to find any well considered and ...
12
votes
2answers
577 views

New WP_Customize API - how does it work under the hood?

I noticed that if you make changes trough the new "customize" feature, when you navigate on a different page within the iframe preview document, your changes still apply, even if they are unsaved. It ...
8
votes
2answers
768 views

Theme customizer - settings order

If I add more than 5 Settings to a single section, the order of the settings gets weird. For example: // Link color $wp_customize->add_setting( 'tonal_'.$themeslug.'_settings[link_color1]', ...
7
votes
1answer
148 views

Get entered value of customiser field for live preview

As per the codex, this question an probably any tutorial on the theme customiser out there, you get the value of a customiser field with the following code: ( function( $ ) { //Update site ...
7
votes
1answer
153 views

Is it possible ( or advisable) to allow open access to the new theme customizer for potential clients?

I've been using the new theme customizer and it really has me thinking how awesome it would be to allow potential theme buyers/clients etc to play with the customizer for a demo theme (without being ...
6
votes
3answers
714 views

get_option() vs get_theme_mod(): Why is one slower?

I've been using get_theme_mod() for some time in various projects of mine. I decided to take advantage of the Theme Customization API in WordPress v3.4 once it was available as I felt it was an ...
4
votes
1answer
104 views

Is having multiple theme customizers for different pages possible?

If you have a theme that for instance has a blog, front page and misc pages is it possible to have more than one theme customizer, so that you can provide a live preview when editing styles? My theme ...
4
votes
1answer
117 views

Theme Customiser Image Control

I'm aware that one can add a control to the theme customiser to add an image. This control returns an image URL however, and I need its attachment ID, not the image URL. Where can I intercept or ...
4
votes
1answer
762 views

How WP_Customize_Background_Image_Control is supposed to work?

I'm trying to add a second background image function to my theme customizer with this code. // HTML Background Image $wp_customize->add_setting( 'html_background_image', array( ...
3
votes
2answers
793 views

Adding a description to theme customizer controls

How could I add a description to $wp_customize->add_control? I've found I really need to include a short description on some of the controls but it doesn't look like it's possible. I noticed you ...
3
votes
4answers
148 views

View category in the preview of Theme Customizer

I am building a theme which Theme customizer changes colors, sizes, etc. and has also the option to choose a category and style that category specifically. How can I display that category in the ...
3
votes
1answer
993 views

How to remove the Theme Customization Button from the dashboard and themes options page?

In my Wordpress theme that I've currently been building I do not take advantage of the Wordpress Theme Customization API. As much as I would like too, I've invested far too much time into my own ...
3
votes
1answer
92 views

How to Save Different Settings Options Using Settings API and/or the Theme Optimizer

I would like to allow users to save different versions in the options panel using the Settings API and/or the Theme Optimzer. For instance, imagine that I have styled my site using via an admin panel ...
3
votes
0answers
111 views

Is it Possible to Extend WP Customize JS Methods?

I’m wondering if it’s possible to extend the methods of the anonymous api object in wp-admin/js/customize-control.js. I need to overwrite one of these methods with my own custom logic but I suspect ...
3
votes
1answer
98 views

Is it possible to display the admin bar while in the Theme Customizer?

I've been using Debug Bar + Kint Debugger for debugging. Presently I'm working on a custom theme where I'm trying to hook some code into customize_save_after. The code doesn't appear to be running ...
2
votes
1answer
1k views

How to add default images into theme customizer image control?

I am trying to figure out how I can pre-load a theme customizer image control with images I have selected. Is their a way to point the control to a directory so they automatically show up in the ...
2
votes
2answers
2k views

How do I implement the Wordpress Iris picker into my plugin on the front-end?

This question here is asking the same question as I am, but there were no adequate answers nor a selected correct answer so I am asking again hoping if I ask in a more coherent manner I might get a ...
2
votes
1answer
475 views

How to execute conditional script when on new customize.php (Theme Customize) screen

The new "Customize" theme screen is a welcome addition in WordPress 3.4, however, I find it conflicts with my method of loading scripts loaded in the footer: In functions.php if(!is_admin()) { /* ...
2
votes
2answers
131 views

Add a “loading” notice when Customizer is making changes

I really want to try and add an overlay and "loading" notice to the wordpress customizer when a change is made. For some of my larger theme changes that are made through the customizer, I am using ...
2
votes
1answer
127 views

Make Theme Options Native to Theme Customizer

With the native Theme Customization API it makes no sense to have an independent options panel. So how do I implement my code (below) into the Theme Customizer? Here is the code for my Theme ...
2
votes
2answers
128 views

$wp_customize customizer_preview_init not firing inside javascript

I'm trying hook the customizer_preview_init action in order to trigger live preview of the changes I'm making in the customizer. However, my first test is failing. I'm just trying to get an alert to ...
2
votes
1answer
113 views

Use default value of wp_customizer in theme_mod output?

Is there a way to output the default value of a wp_customize text field type using the echo get_theme_mod (); without actually going in the Theme Customizer, modifying something and then saving it? ...
2
votes
2answers
142 views

How do I conditionally enqueue stylesheets or scripts in theme customizer settings?

I'm developing a new WordPress theme and I'm at the point where I'm adding theme customizer options. Most of them have been surprisingly easy to implement, but I'm stumped on a couple of important ...
2
votes
1answer
458 views

Modify Javascript Configuration Options for Theme Customizer Colour Picker

I've started fully integrating the Wordpress Theme Customisation API into my Wordpress theme and it's phenomenal. One issue I've encountered is that including the default colour picker is great, but I ...
2
votes
1answer
68 views

Edit a different page in WP Customizer

I'm working with Customizer's incredible options, and so far so good, it's really powerful and does everything I want. However, I'd like to extend it, so instead of editing only the main page, I want ...
2
votes
1answer
183 views

How to load some jquery code to make validation in the theme customizer?

i am tring to load some jquery code to make validation in the theme customizer. i have created 10 checkboxes to show some info. but i want to limited the user to choose only 5 checkboxes. so i have ...
2
votes
1answer
353 views

Trigger Customizer saving process with Javascript only

I'm working on a custom theme that uses WordPress Customization API to let the user play with parts of the content of his website, basically the front-page which he can modify by adding/removing ...
2
votes
1answer
260 views

Responsive Images - Generating multiple images from Theme Customizer control upload?

So, after poking around in the code it looks like the filter image_make_intermediate_size is not called by the various WP_Customize_Control() classes at either WP_Customize_Image_Control() or it's ...
2
votes
1answer
385 views

In the new Theme Customizer API, how to send a value from the front back to the admin panel?

I'm digging a bit into the new Theme Customizer API, in particular into the javascript one, and what I find is delighting. I've managed to add my own custom parameters, and I also have the javascript ...
2
votes
1answer
446 views

Theme Customizer changes are dissappearing when change page

An example option i am using: // Layout $wp_customize->add_setting( $themeslug.'_settings[layout]', array( 'default' => 'content-sidebar', 'type' => 'option', ...
2
votes
1answer
260 views

With WP 3.4 customizer, while using postMessage & working within your JS for one option, can you retrieve current value for another option?

I'm currently working with this awesome article by Otto: http://ottopress.com/2012/how-to-leverage-the-theme-customizer-in-your-own-themes/ For my question, I have two separately registered settings, ...
2
votes
1answer
37 views

Using jQuery to retrieve customizer value

I am trying to use jQuery to retrieve a theme options (customizer) value: $wp_customize->add_setting( 'header_fixed', array( 'default' => true, ) ); ...
2
votes
0answers
39 views

How to enable “shift-click to edit this widget” functionality on a custom widget?

I have created several custom widgets using the default widgets code as examples. The widgets all work fine, and I've been using them in production for awhile. I've been working with the new ...
2
votes
1answer
52 views

Internalize get_theme_mod CSS Into Stylesheet?

This code adds custom CSS selections from the theme customizer. What I hate about this code is that it outputs the style tags directly into the site's html, rather than tacking the selections onto my ...
2
votes
0answers
95 views

Allow anonymous user to access Themes Customizer

I created a theme and use Themes Customizer. Is there any way I can give anonymous users access to the themes customizer without the ability to save it? It will be very convenient in terms of user ...
2
votes
1answer
822 views

How to use rgba color from theme customizer color picker

I'm creating a wordpress theme and in that I am using the theme customizer to allow users to change the accent color of my theme. Now everything is working fine but few of my elements need to have the ...
2
votes
0answers
143 views

Customizer preview doesn't update get_option() value properly

I have a setting in index.php if(get_option('cb2_blog_home')){ cb_get_blog_links(); } This code allows the home page blog index to be turned on and off. The cb_get_blog_links() function draws ...
2
votes
1answer
304 views

Crop image from get_theme_mod Customizer field

I'm using the following code to allow a user to upload a custom image (in addition to header image) through the customizer. Is there a way to crop the image when displaying it? ...
1
vote
3answers
2k views

How do I remove a pre-exising customizer setting?

My theme doesn't use the tag line, how can I remove it from the customizer?
1
vote
1answer
337 views

Is it possible to get a theme customizer setting from wp.customize using jquery?

I am wondering if it is possible to directly interop with the wp.customize api to get a value of a theme customizer setting. The way I am doing it now is using ajax to get a response from a php ...
1
vote
2answers
150 views

How to check if I am inside the WP Theme Customizer preview?

I have some elements showing on the home page that I do not want to display in the Theme Customizer preview window. Is there a simple check in PHP that I can use for that ? For example: <img ...
1
vote
1answer
428 views

Way to check if we are in Theme Customizer mode? [duplicate]

Possible Duplicate: How to execute conditional script when on new customize.php (Theme Customize) screen Is there a Conditional Tag, or any other method, that we can use to check if we are ...
1
vote
2answers
297 views

How do I add customize_register action AFTER adding a custom taxonomy

customize_register only works with the customize_register hook, and regardless of what hook I use to add the custom taxonomy, it always happens after customize_register. (I want to loop through the ...
1
vote
1answer
39 views

Input ordering in wordpress theme customizer

I'm trying to add custom fields to the wordpress theme customizer for the theme that I'm creating. $wp_customize->add_section( 'sometheme_theme_customization_section', array( ...
1
vote
2answers
535 views

create drop down menu in theme customizer from custom db

what i am trying to do is create drop down menu in theme customizer from custom db i have created. db name "students". in the db i have only the id and the name. i want to show all students names in ...
1
vote
1answer
1k views

Unable to pass variable on theme cusomizer add_settings()

I have theme options saved as serialized data. And I have named the option name by getting theme name. $theme = wp_get_theme(); $settings = sanitize_title($theme).'-options'; // do not change! But ...
1
vote
1answer
36 views

Customizer: Unique identifier that distinguishes which image upload control is uploading an image

In the Theme Customizer, I've got a custom add_action('wp_handle_upload', 'upscale_responsive_bg_imgs') which upscales responsive background images when uploaded from the theme customizer. It's ...
1
vote
1answer
103 views

Convert an theme options page to use in customize.php also?

I have developed a theme options page which is a submenu page of appearance. But now i like to know how what i need to do so the theme options are also editable in the theme->customize interface. ...
1
vote
1answer
227 views

Loop get_theme_mod

I've got a bunch of customizer settings set up Rather than calling individual get_theme_mod statements for each setting individually, is there a way to simplify it to loop thru them without having to ...