get_theme_mod not working
-
Hi
I have this in index<?php $lay = get_theme_mod('layouts_sitting'); get_template_part( 'loop', $lay ); ?>
also I have this in customizer.php
function themez_customize_register( $wp_customize ) { $wp_customize->add_section( 'themez_scheme', array( 'title' => __( 'scheme' ), 'description' => 'pick' )); $wp_customize->add_setting('layouts_sitting', array( 'capability' => 'edit_theme_options', 'default' => 'index', )); $wp_customize->add_control( 'themez_scheme', array( 'label' => __( 'LAYOUTS', 'themez' ), 'section' => 'themez_scheme', 'settings' => 'layouts_sitting', 'type' => 'radio', 'choices' => array( 'index' => 'Choice 1', 'index2' => 'Choice 2' )); } add_action( 'customize_register', 'themez_customize_register' );
the idea is changing the loop from customizer panel
get_template_part( 'loop', $lay );
where $lay is index or index2
but it doesnt work so far
any help ??
- The topic ‘get_theme_mod not working’ is closed to new replies.