WordPress Child Theme – Change Header Image Size
WordPress Child Theme Case Study: 2020 Euro Lens Bath
- Create a Child Theme (style.css and functions.php files)
- In the functions.php file, add:
<?php /** Tell WordPress to run child_theme_setup() when the 'after_setup_theme' hook is run. Help from: http://digitalraindrops.net/2010/08/the-second-menu/ */ add_action( 'after_setup_theme', 'child_theme_setup' ); /** This function will hold our new calls and overrides. Help from: http://digitalraindrops.net/2010/08/the-second-menu/ */ if ( !function_exists( 'child_theme_setup' ) ): function child_theme_setup() { // Change header image size to: 940 x 132 . Help from: http://lisles.net/header-image/ add_filter('twentyten_header_image_height','eurolensbath_header_height'); add_filter('twentyten_header_image_width','eurolensbath_header_width'); function eurolensbath_header_height($size){ return 132; } function eurolensbath_header_width($size){ return 940; } } endif;