I am trying to get my child theme to work and to overide one line of code in the main theme functions.php but I can not getting to work since I am totally green in php.
In my main theme functions.php I have:
add_image_size('portfolio-three', 300, 214, true);
When I change it directly, change the image size it works like a charm and resizes images in my portfolio page. But I want to include it in child theme. The code of the functions.php in child theme is like this:
<?php
function mytheme_child_scripts() {
if ( ! is_admin() && ! in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ) ) ) {
$theme_info = wp_get_theme();
wp_enqueue_style( 'mytheme-child-stylesheet', get_template_directory_uri() . '/style.css', array(), $theme_info->get( 'Version' ) );
}
}
add_action('wp_enqueue_scripts', 'mytheme_child_scripts');
add_image_size('portfolio-three', 388, 214, true);
?>
And it does not work, nothing happens, no error and also no image resize.
I do not know what to do here. Could anyone please help me with implementing it properly ?
Best regards!
Jacek