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 (1)

22
votes
4answers
5k 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 ...
16
votes
2answers
1k 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 ...
13
votes
2answers
686 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 ...
9
votes
4answers
5k 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 ...
9
votes
2answers
1k 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]', array(...
9
votes
2answers
612 views

Customizer JS API

Okay so I have been trying to educate myself to create new panels sections and controls dynamically using customizer's JS API. It has been frustrating few days and I was unable to get the exact way ...
8
votes
1answer
777 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 ...
7
votes
2answers
4k 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 ...
7
votes
1answer
327 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
210 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
4answers
6k views

How do I remove a pre-existing customizer setting?

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

Link to specific Customizer section

I've got a site with a few extra Customizer sections. Is there a way to link directly to these so that section open when the page loads? Something like http://mysites.com/wp-admin/customize.php#...
6
votes
1answer
57 views

When cropping a header image, retain meta data (i.e. name, description, etc.) from original image?

I'm currently using WordPress's built in Custom Headers to get images for a slideshow on the homepage of my website. For the most part, this has worked as intended; it allows me to upload a set of ...
6
votes
1answer
163 views

How to adjust the Device Preview sizes used in the WP 4.5 Customizer?

WP 4.5 introduced the Device Preview in the Customizer and it's pretty easy to use. Click one of three icons and see your site at various (predetermined) sizes. The desktop version will always fill ...
5
votes
2answers
3k 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 ...
5
votes
2answers
175 views

Allow Shortcode in Theme Customizer

All theme dev who follows the wp guidelines properly, now uses ability of default wp customizer to customize their themes, instead of making a different theme option section the admin panel. But what ...
5
votes
1answer
99 views

Custom Image section in Customizer

So I have this Custom Section in the Customizer that controls the Feature Products on the Home Page. There all registered and so on but the problem I'm stuck on is when the client uploads one of the ...
5
votes
1answer
133 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 ...
5
votes
1answer
97 views

Customizer Active Callback not working

From some reason my active_callback => 'is_front_page' is not working and therefore not showing up inside the customizer on the front-page. I have definitely set my front page to static and ...
5
votes
1answer
84 views

Custom editable content for front page from Theme Customizer

I developed a very basic theme with underscores. I am looking for custom editable content, or a changeable page, from the Theme Customizer for front-page.php. For example, when a user goes to ...
5
votes
1answer
60 views

How to customize a shortcode using the customizer

General context: I have a plugin which implements a widget and I would like to make the widget into a shortcode. The widget has many options some of them mutually exclusive, and it is never good UX ...
5
votes
0answers
53 views

Can I create customizer setting that can handle plugin shortcode?

Can I create a customizer setting which will handle a shortcode from a plugin? Do I violate and rules or guidelines in WordPress theme development? If it's possible what is the best way to sanitize ...
5
votes
0answers
123 views

SSL breaks customizer: page isn't returned from ajax

I have a WordPress install using a Comodo SSL certificate. I have the WordPress HTTPS plugin installed and I'm using the AZ theme, and the admin is set to load over HTTPS. So far so good. On the ...
4
votes
2answers
2k 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 ...
4
votes
2answers
46 views

Display custom_background outside wp_head()

My theme is a very small one page theme which really doesn't need all the scripts, so I've created a few options to remove wp_head() and wp_footer() so the user can choose if they want to enable or ...
4
votes
2answers
153 views

Get all registered wp theme customizer sections?

Is there a way to retrieve all the registered customizer sections? I'm building out a custom customizer and don't want other plugin or themes who register custom sections to appear on this page. I ...
4
votes
1answer
258 views

Is the theme customizer slowing down my site?

I have built an awesome theme, which is very flexible, because it has 500 settings in the theme customizer. I generate the live css like it says in the codex: function mytheme_customize_css() { ?&...
4
votes
1answer
144 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
1k 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( ...
4
votes
0answers
13 views

How to upload multiple images with WP_Customize_Media_Control

This question is specifically related to the WordPress Customizer. I am looking for a way to upload multiple images with the WP_Customize_Media_Control. It is easy to do this for metaboxes, but I do ...
4
votes
0answers
34 views

WP Customizer - Prevent live preview

How do I prevent a widget being updated in the customizer preview if a widget field fails a JS validation check? More generally, is there any actual documentation for the customizer JS API? (I mean ...
4
votes
2answers
177 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 ...
3
votes
2answers
1k 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? ...
3
votes
1answer
150 views

Editing the custom background CSS

I have added the add_theme_support( 'custom-background'); function to my functions.php but the CSS which will be added to the wp_head isn't the way I want it to be. <style type="text/css" id="...
3
votes
2answers
282 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 ...
3
votes
1answer
176 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 ...
3
votes
1answer
152 views

Theme Customization API options on install

I'm working on a theme that use the WordPress Theme Customization API. Everything is working as it should, except on initial theme install. Some of my options need to be set straight away on theme ...
3
votes
2answers
395 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 ...
3
votes
1answer
50 views

Remove nav_menus from customizer using a theme

Is there a way to remove the "Menu's" or in dev language nav_menus from the customizer? I have tried $wp_customize->remove_section('nav_menus'); but that did not work. $wp_customize->...
3
votes
2answers
117 views

How to change the themes “Live Preview” url within the Appearance->Themes page?

I need a way to change the themes "Live Preview" url within the Appearance->Themes page? I want the themes thumbnails to link to a demo site showcasing the theme and not open the customizer. I looked ...
3
votes
2answers
58 views

Theme option : having the ability to select among several predefined headers

I'm in the process of creating my first theme, and I'm using Quark as a starter theme. I would like the theme to have various options, one being header selection. (let's say 5 different headers - ...
3
votes
1answer
927 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 ...
3
votes
4answers
170 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
104 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
20 views

Send data from Customizer Settings to Customizer Preview with settingless control

There are a few ways to speak back and forth with the customizer API. I don't think my scenario is that much f an offshoot so I will give it to you. I have a button in the Customizer to trigger a ...
3
votes
1answer
339 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 ...
3
votes
0answers
303 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 ...
3
votes
1answer
312 views

Need help setting default setting value for radio button in theme customizer

I need help figuring out how the radio button saves it's value in the theme settings. In my theme I added Radio buttons in the theme customizer. So far they are working great. Although I have one ...
3
votes
1answer
136 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 ...
3
votes
2answers
408 views

One button to change all settings in theme customizer?

I have been attempting to create a theme reset button for the theme customizer that automatically removes all of the theme_mod settings. I have tried multiple ways to do this and have never been able ...