Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
2 replaced http://wordpress.stackexchange.com/ with https://wordpress.stackexchange.com/
source | link

I trying to create a child theme from theme twenty thirteen. One feature I want to add in my child theme is that I can specify (via Coding) a different header image on each page. I've asked the same for twenty eleven themeasked the same for twenty eleven theme - therefore it worked (but was is was not implemented in a child theme).

Is there a way how I can do this within functions.php or do I need to override header.php like in twenty eleven?

<?php
    if ( is_home() ) $my_header_image = get_header_image(); //gets default header, specified in custom_header.php
    elseif ( is_page(26) ) $my_header_image =  get_bloginfo('stylesheet_directory').'/images/news_header.png";
    elseif ( is_page(N) ) ...
    else $my_header_image = get_header_image(); 
?>
<img src="<?php echo $my_header_image; ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" />

Regards, mybecks

I trying to create a child theme from theme twenty thirteen. One feature I want to add in my child theme is that I can specify (via Coding) a different header image on each page. I've asked the same for twenty eleven theme - therefore it worked (but was is was not implemented in a child theme).

Is there a way how I can do this within functions.php or do I need to override header.php like in twenty eleven?

<?php
    if ( is_home() ) $my_header_image = get_header_image(); //gets default header, specified in custom_header.php
    elseif ( is_page(26) ) $my_header_image =  get_bloginfo('stylesheet_directory').'/images/news_header.png";
    elseif ( is_page(N) ) ...
    else $my_header_image = get_header_image(); 
?>
<img src="<?php echo $my_header_image; ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" />

Regards, mybecks

I trying to create a child theme from theme twenty thirteen. One feature I want to add in my child theme is that I can specify (via Coding) a different header image on each page. I've asked the same for twenty eleven theme - therefore it worked (but was is was not implemented in a child theme).

Is there a way how I can do this within functions.php or do I need to override header.php like in twenty eleven?

<?php
    if ( is_home() ) $my_header_image = get_header_image(); //gets default header, specified in custom_header.php
    elseif ( is_page(26) ) $my_header_image =  get_bloginfo('stylesheet_directory').'/images/news_header.png";
    elseif ( is_page(N) ) ...
    else $my_header_image = get_header_image(); 
?>
<img src="<?php echo $my_header_image; ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" />

Regards, mybecks

1
source | link

Different header for each page in child theme of twenty thirteen

I trying to create a child theme from theme twenty thirteen. One feature I want to add in my child theme is that I can specify (via Coding) a different header image on each page. I've asked the same for twenty eleven theme - therefore it worked (but was is was not implemented in a child theme).

Is there a way how I can do this within functions.php or do I need to override header.php like in twenty eleven?

<?php
    if ( is_home() ) $my_header_image = get_header_image(); //gets default header, specified in custom_header.php
    elseif ( is_page(26) ) $my_header_image =  get_bloginfo('stylesheet_directory').'/images/news_header.png";
    elseif ( is_page(N) ) ...
    else $my_header_image = get_header_image(); 
?>
<img src="<?php echo $my_header_image; ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" />

Regards, mybecks