Title: get_theme_mod not working
Last modified: August 22, 2016

---

# get_theme_mod not working

 *  [dasr_amine](https://wordpress.org/support/users/dasr_amine/)
 * (@dasr_amine)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [dasr_amine](https://wordpress.org/support/users/dasr_amine/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/get_theme_mod-not-working/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
