Change functions.php in child theme

Hello there,

I want to change the code below in the functions.php under child theme, but the modified code didn’t work:
Old code
add_theme_support( ‘title-tag’ );

/*
 * Enable support for Post Thumbnails on posts and pages.
 *
 * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
 */
add_theme_support( 'post-thumbnails' );
add_image_size('sydney-large-thumb', 830);
add_image_size('sydney-medium-thumb', 550, 400, true);
add_image_size('sydney-small-thumb', 230);
add_image_size('sydney-service-thumb', 350);
add_image_size('sydney-mas-thumb', 480);

// This theme uses wp_nav_menu() in one location.
register_nav_menus( array(
	'primary' => __( 'Primary Menu', 'sydney' ),
) );

New Code
add_theme_support( ‘title-tag’ );

/*
 * Enable support for Post Thumbnails on posts and pages.
 *
 * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
 */
add_theme_support( 'post-thumbnails' );
add_image_size('sydney-large-thumb', 830);
add_image_size('sydney-medium-thumb', 477, 224, true);
add_image_size('sydney-small-thumb', 230);
add_image_size('sydney-service-thumb', 350);
add_image_size('sydney-mas-thumb', 480);

// This theme uses wp_nav_menu() in one location.
register_nav_menus( array(
	'primary' => __( 'Primary Menu', 'sydney' ),
) );

Is there any way to apply this code in the child theme’s functions.php?

Thank you very much!

Hello there,

It looks like you were trying to set new size for sydney-medium-thumb key. The easier was is use this plugin instead of rewriting the function that seems not to be allowed.

In the plugin’s settings panel, find the row of sydney-medium-thumb and set your own size.

Regards,
Kharis