Override contenct of functions.php in child theme
-
Hi there wordpressers =)
Im a bit new to wordpress and I have a question regarding overrides of the functions.php in my theme. I have read some tutorials how to override a part of the functions.php but I cannot get it for my needs.
Follwoing problem. I have a function in my parent functions.php that have this content:function streamtube_setup() { //remove_theme_support( ‘widgets-block-editor’ ); /* * Make theme available for translation. */ load_theme_textdomain( ‘streamtube’, get_template_directory() . ‘/languages’ ); // Add default posts and comments RSS feed links to head. add_theme_support( ‘automatic-feed-links’ ); /* * Let WordPress manage the document title. */ add_theme_support( ‘title-tag’ ); add_image_size( ‘streamtube-image-medium’, 560, 315, true ); /* * Enable support for Post Thumbnails on posts and pages. * * @link https://developer.www.ads-software.com/themes/functionality/featured-images-post-thumbnails/ */ add_theme_support( ‘post-thumbnails’ ); set_post_thumbnail_size( 1568, 800 ); register_nav_menus( array( ‘primary’ => esc_html__( ‘Primary Menu’, ‘streamtube’ ) ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( ‘html5’, array( ‘comment-form’, ‘comment-list’, ‘gallery’, ‘caption’, ‘style’, ‘script’, ‘navigation-widgets’, ) ); /** * Add support for core custom logo. * * @link https://codex.www.ads-software.com/Theme_Logo */ add_theme_support( ‘custom-logo’, array( ‘flex-width’ => true, ‘flex-height’ => true, ‘unlink-homepage-logo’ => false, ) ); // Add theme support for selective refresh for widgets. add_theme_support( ‘customize-selective-refresh-widgets’ ); // Add support for Block Styles. add_theme_support( ‘wp-block-styles’ ); // Add support for full and wide align images. add_theme_support( ‘align-wide’ ); // Custom background color. add_theme_support( ‘custom-background’, array( ‘default-color’ => ‘#f6f6f6’, ) ); // Add support for responsive embedded content. add_theme_support( ‘responsive-embeds’ ); add_theme_support(‘woocommerce’);}add_action( ‘after_setup_theme’, ‘streamtube_setup’ );
What I now want is simply overwriting the part:
add_image_size( ‘streamtube-image-medium’, 560, 315, true );
in
add_image_size( ‘streamtube-image-medium’, 350, 200, true );I just want to change the thumbnail size. Can anybody help me out how this have to be assigned to the functions.php of the child theme?
Thanks for your help,
kweb
- The topic ‘Override contenct of functions.php in child theme’ is closed to new replies.