Lynda.com – Build a ChildTheme
-
Hello guys,
I’m using wordpress 3.5.1 and in an exercise, the tutor talks about creating a functions.php file into the child theme like:
twentyten
functions.php
blabla subfolders
childoftwentyten
style.cssThe goal is to change the header size, in his functions.php (the twentyten functions.php file and the functions.php in the child theme) screen:
define('HEADER_IMAGE_WIDTH', apply_fiters('twentyten_header_image_width', 940)); define('HEADER_IMAGE_HEIGHT', apply_filters('twentyten_header_image_height', 198));He takes this portion and copy paste into the functions.php child theme.
My code is different in my wordpress (3.5.1), it is formulated this way:
function twentyten_setup() { //blabla stuff // The custom header business starts here. $custom_header_support = array( // The default image to use. // The %s is a placeholder for the theme template directory URI. 'default-image' => '%s/images/headers/path.jpg', // The height and width of our custom header. 'width' => apply_filters( 'twentyten_header_image_width', 940 ), 'height' => apply_filters( 'twentyten_header_image_height', 198 ), // Support flexible heights. 'flex-height' => true, // Don't support text inside the header image. 'header-text' => false, // Callback for styling the header preview in the admin. 'admin-head-callback' => 'twentyten_admin_header_style', ); add_theme_support( 'custom-header', $custom_header_support ); if ( ! function_exists( 'get_custom_header' ) ) { // This is all for compatibility with versions of WordPress prior to 3.4. define( 'HEADER_TEXTCOLOR', '' ); define( 'NO_HEADER_TEXT', true ); define( 'HEADER_IMAGE', $custom_header_support['default-image'] ); define( 'HEADER_IMAGE_WIDTH', $custom_header_support['width'] ); define( 'HEADER_IMAGE_HEIGHT', $custom_header_support['height'] ); add_custom_image_header( '', $custom_header_support['admin-head-callback'] ); add_custom_background(); } // blabla stuff again }What portion of code do I have to copy paste to make it clean, as it is different from the tutorial example?
Thanks
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Lynda.com – Build a ChildTheme’ is closed to new replies.