I was following a WordPress course
the problem is for the theme customizer nothing is adding settings, sections, control
plz tell me if am I making some mistake I spend 4 hours trying to find the mistake the folder structure is correct, it's showing errors If I do something wrong but it's just not showing anything in customize section of the theme
theme-customizer.php code:
<?PHP
function ju_customize_register( $wp_customize ){
$wp_customize->add_setting( 'ju_facebook_handle', [
'default' => ''
]);
$wp_customize->add_section( 'ju_social_section', [
'title' => __( 'Udemy Social Settings', 'udemy' ),
'priority' => 30,
'panel' => 'udemy'
]);
$wp_customize->add_control(new WP_Customize_Control(
$wp_customize,
'ju_social_facebook_input',
array(
'label' => __( 'Facebook Handle', 'udemy' ),
'section' => 'ju_social_section',
'settings' => 'ju_facebook_handle'
)
));
}
functions.php file :
<?php
//setup
define('ju_mode',true);
//includes
include( get_theme_file_path( 'includes/front/enqueue.php' ) );
include( get_theme_file_path( 'includes/setup.php' ) );
include( get_theme_file_path( 'includes/widgets.php' ) );
include( get_theme_file_path( 'includes/theme-customizer.php' ) );
//hooks
// for scripts
add_action( 'wp_enqueue_scripts','ju_enqueue' );
// for navbar
add_action('after_setup_theme','ju_setup');
//for Sidebar
add_action('widgets_init','ju_widgets');
// for custmizer social icons
add_action( 'customize_register', 'ju_customize_register' );
//shortcodes