Custom HTML structure in customizer not rendring in Browser

Question

$wp_customize->add_section( 'sutta_section', array(
  'title'    => __( 'Sutta', 'yourtheme' ),
  'priority' => 160,
));

$wp_customize->add_setting( 'show_sutta', array(
  'default'    => true,
  'type'       => 'theme_mod',
  'capability' => 'edit_theme_options',
));

$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'show_sutta', array(
  'label'    => __( 'Show Sutta', 'yourtheme' ),
  'section'  => 'sutta_section',
  'settings' => 'show_sutta',
  'type'     => 'checkbox',
  'input_attrs' => array(
    'class' => 'tgl tgl-light',
    'id' => 'cb1',
  ),
  'label_class' => 'tgl-btn',
)));

On the above, I want to deliver a custom HTML structure for Input and label so that I can make some changes in the HTML of the checkbox.

However, in the browser those classes and IDS are still not reflecting →

enter image description here

Am I using wrong hooks/approach.

0
WordCent 2 months 2023-03-21T03:09:05-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse