1

I'm created a child-theme of the OnePress theme and would like to update a part of the inc/customizer.php function. Specifically, the theme customizer adds the following control:

$wp_customize->add_control(
    new Onepress_Customize_Repeatable_Control(
        $wp_customize,
        'onepress_hero_images',
        array(
            'label'     => esc_html__('Background Images', 'onepress'),
            'description'   => '',
            'priority'     => 40,
            'section'       => 'onepress_hero_images',
            'title_format'  => esc_html__( 'Background', 'onepress'), // [live_title]
            'max_item'      => 2, // Maximum item can add

            'fields'    => array(
                'image' => array(
                    'title' => esc_html__('Background Image', 'onepress'),
                    'type'  =>'media',
                    'default' => array(
                        'url' => get_template_directory_uri().'/assets/images/hero5.jpg',
                        'id' => ''
                    )
                ),

            ),

        )
    )
);

I've made a child theme and would like to update the max_item parameter to 5 from within the child theme. The above code forms part of a huge function, of which I only want to change a small part. I don't know if the original container function

function onepress_customize_register( $wp_customize ) {
  // lots of stuff here
}

is pluggable or not.

How can I change just that specific piece of code from within the child theme?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.