Per Søderlind

I code for fun

  1. customizer

Category: customizer

Resetting the Customizer in your WordPress Theme to a blank slate

Thanks to Weston Router at XWP, removing all the default WordPress customizer entries is easy using the Customizer Blank Slate plugin. The only caveat is that it must be loaded as a plugin. So what do you do if you want to use it in a theme? You add Customizer Blank Slate to mu-plugins.

So what do you do if you want to use it in a theme? You add Customizer Blank Slate to mu-plugins.

1) Download Customizer Blank Slate, extract the zip and copy the files to the wp-content/mu-plugins folder.

Launch the Customizer and you’ll see that the default entries are still there. To trigger the Customizer Blank Slate you have to append customizer_blank_slate=on to the customizer.php url.

2) You do that by adding the following to your (child)theme functions.php

3) When adding your own customizer entries you have to add them using the wp_loaded hook with a priority  set to 9:

 

An SVG logo Custom Control for the WordPress Customizer

svg-logo

Another proof of concept.

Read More

WordPress Customizer Demo: In Twenty Sixteen, toggle post meta on or off

customizer-post-meta

Read More

Plugin Customizer: Ad WordPress customizer to a plugin

Plugin Customizer

tl;dr –  The commented demo plugin is available at GitHub.

Read More

Powered by WordPress & Theme by Anders Norén