• Resolved tiago fabre

    (@tiagofabre)


    I am trying to use a dropdown page control to select a page but it is not working. With others control it works perfect.

    functions.php

    //section
    $wp_customize->add_section('themename_color_scheme', array(
        'title'    => __('Color Scheme', 'themename'),
        'description' => '',
        'priority' => 120,
    ));
    //setting
    $wp_customize->add_setting('landing1', array(
            'capability'     => 'edit_theme_options',
            'type'           => 'option',
    
        ));
    //control
    $wp_customize->add_control('ld', array(
            'label'      => 'Front page section 1',
            'section'    => 'themename_color_scheme',
            'type'    => 'dropdown-pages',
            'settings'   => 'landing1',
    ));

    page:

    //trying to show the data (not working :/  )
    $mod = get_theme_mod( 'ld');
    echo($mod);
    echo var_dump($mod);

    echo ($mod) dont show anything and var_dump show “boolean false”

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘wp customizer api dropdown-pages’ is closed to new replies.