• Code Customize demo
    $wp_customize->add_control(
    new WP_Customize_Image_Control(
    $wp_customize,
    ‘logo’,
    array(
    ‘label’ => __( ‘Upload a logo’, ‘theme_name’ ),
    ‘section’ => ‘your_section_id’,
    ‘settings’ => ‘your_setting_id’,
    ‘context’ => ‘your_setting_context’
    )
    )
    );

Viewing 3 replies - 1 through 3 (of 3 total)
  • I too would like to know this.

    Thanks

    All I can pull out from the get_theme_mod() is the url of the image. I would like to specify the image size I have set in the functions.php

    Hi,
    i came a cross this and this is working fine

    $wp_customize->add_control( new WP_Customize_Cropped_Image_Control( $wp_customize, 'cropped_image', array(
        'section'     => 'background_image',
        'label'       => __( 'Croppable Image' ),
        'flex_width'  => true, // Allow any width, making the specified value recommended. False by default.
        'flex_height' => false, // Require the resulting image to be exactly as tall as the height attribute (default).
        'width'       => 1920,
        'height'      => 1080,
    ) ) );
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to change size image when user WP_Customize_Image_Control on customize’ is closed to new replies.