| |

WordPress Child Theme – Header Rotating Images on Home Page Only

WordPress version: 3.1.3
Parent theme: TwentyTen 1.2

Header rotating images should only display on the Home page and not the inside Pages, Posts or blog page. The Home page is a child theme template (front.php), which makes it easy to control via WordPress conditional tags.

File: Header.php (in the child theme folder)


elseif ( get_header_image() ) : ?>
<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />


elseif ( is_page_template( 'front.php' ) ) : ?>
<div id="cimy_div_id">
<img id="cimy_img_id" src="http://2020eyes.designparc.com/wp-content/Cimy_Header_Images/2020eyes%20slides_2.jpg" alt="" />

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *