How do i use add_image_size in my customizer section image?
-
I have created a section in the customizer section where i use WP_Customize_Media_Control to pull out image to use in each section area. My challenge now is that, my section image does not resize according to add_theme_support( ‘post-thumbnails’ );.
Kindly look into what i have done below as correct me where necessary. In this scenario, i want it to use add_theme_support( ‘post-thumbnails’ ); with add_image_size( ‘full’, 1920, 500 );. What i have done so far does not give me the desire result. Kindly look below. How should i resolve the whole problem?.'etere_front_hero_section', array( 'priority' => 3, 'panel' => 'etere_theme_options', 'title' => __( 'Home Banner Section', 'etere' ), 'capability' => 'edit_theme_options', ) ); // Add your customizer block $wp_customize->add_setting( 'etere_hero_bg_image', array( 'transport' => 'refresh', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Media_Control( $wp_customize, 'etere_hero_bg_image', array( 'label' => __('Add/Edit Hero Image', 'etere'), 'section' => 'etere_front_hero_section', 'settings' => 'etere_hero_bg_image', 'mime_type' => 'image', ) ) );
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘How do i use add_image_size in my customizer section image?’ is closed to new replies.