Child theme – overriding add_image_size by a child theme [duplicate]

I would like to thank very much cybmeta for pointing me tho the other thread where I could find a solution to my problem. All works perfectly now and I am glad I received help so fast.

I have modified my child functions.php like below:

<?php
function mytheme_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');
function child_theme_setup() {
    add_image_size('portfolio-three', 359, 214, true);
}
add_action( 'after_setup_theme', 'child_theme_setup', 11 );

It now works like a charm.
Thank you mr cybmeta and best regards to you and all the community.

Leave a Comment