To do this, we need to add some code to our functions.php
file.
functions.php
file.?>
tag, add the following:function add_theme_customizer( $wp_customize ) { } add_action( 'customize_register', ' add_theme_customizer'),
functions.php
file.We added a new function to add Theme Customizer capability to our theme. Let's have a look at that function:
add_theme_customizer
. You can give this any name you want, the name we've used makes it easy to see what the function does.add_theme_customizer
function when WordPress runs the customize_register
function, which is a default function.Now we can view the Theme Customizer for our theme. As we haven't defined any additional functions, it currently includes the default options provided by WordPress:
We can see the default customizations added by WordPress:
We can add more options to the Theme Customizer, so let's do it.