Customizer API not showing Panel or Section
-
Hi, I’m beginner in WordPress theme development and I’m learning customizer API.
However, I’m stuck in place where I was trying to use Customizer API to change the Navigation Menu background color using WordPress Customizer but it’s showing nothing despite I’ve included all the necessary lines according to my knowledge. Here is the code I was trying to implement inside – functions.php:// Adding Extra Customizer Settings function textdomain_pro_theme($wp_customize) { //Panel $wp_customize->add_panel( 'pro_features', array( 'title' => 'Pro Features', 'priority' => 10 )); // Section $wp_customize->add_section( 'color_picking' , array( 'title' => 'Color Settings', 'panel' => 'pro_features', 'priority' => 30 )); // Setting Input $wp_customize->add_setting( 'nav_menu_bgcolor', array( 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'default' => '#ff2525', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', )); // Setting Controller $wp_customize->add_control( 'nav_menu_bgcolor', array( 'label' => 'Navigation Bar Color', 'type' => 'color', 'section' => 'pro_features', )); } add_action( 'customize_register', 'textdomain_pro_theme' );
THE RESULT DOESN’T SHOW ANY PANEL NAMED “PRO FEATURES”. WHAT WENT WRONG?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Customizer API not showing Panel or Section’ is closed to new replies.