• Hi,

    Really really like the plugin, its coded really nicely, i just need some help if possible.

    I’m using Kirki Theme Customizer plugin to replace the standard WordPress Theme customizer.

    Below is the Kirki Code i’m using and would just like to know like to know if i can change a theme based on the selection of a radio button.

    The Separate themes are included in /framework/views/theme1

    /**
     * Choose a base theme
     */
    function chunk_fields( $fields ) {
    
        $fields[] = array(
            'type'        => 'radio',
            'setting'     => 'radio_demo',
            'label'       => __( 'Choose Your Base Theme', 'test' ),
            'description' => __( 'Endless ways to create a website with ease', 'test' ),
            'help'        => __( 'There will be a new base theme created every 6 months.', 'test' ),
            'section'     => 'chunk',
            'default'     => 'option-1',
            'priority'    => 10,
            'choices'     => array(
                'option-1' => __( 'Theme 1', 'test' ),
                'option-2' => __( 'Theme 2', 'test' ),
                /*This is where to add more themes in*/
            ),
        );
    
        return $fields;
    }
    add_filter( 'kirki/fields', 'chunk_fields' );

    Any help would be much appreciated.

    All the best

    Thanks Jake.

    https://www.ads-software.com/plugins/wp-conditional-themes/

  • The topic ‘Switching Themes From The Theme Customizer’ is closed to new replies.