• WordPress version: 3.4
    Theme: RT-15 (purchased from ThemeForest.net)
    Link to theme: https://themeforest.net/item/rttheme-15-premium-wordpress-theme/full_screen_preview/781397

    I tried the support page for the theme, but could not get any help.

    I’m trying to add a custom header image (640×140) above the slideshow on my static homepage. I want this custom header image to show up only on the homepage.

    I understand HTML but I am a total newbie to PHP and thus, I cannot figure out how to add a customer header above the slideshow on my homepage.

    I created some CSS:

    .homepage-header {
    	background: url("https://www.mytesttheme.net/wp-content/themes/yellow/images/homepage-header.jpg") no-repeat;
    	width: 640px;
    	height: 140px;

    Here is the top part of code block for index.php:

    <?php
    /*
    * rt-theme home page
    */
    get_header();
    ?>
    
    	<!-- slider -->
    	<?php if(get_option(THEMESLUG."_slider_active") && is_front_page()){	//if slider active and is front page
    			//Slider selection
    			if(get_option(THEMESLUG.'_home_slider_script')=="" or get_option(THEMESLUG.'_home_slider_script')=="cycle"){
    				get_template_part( 'slider', 'home_slider' );
    			}else{
    				get_template_part( 'nivo-slider', 'home_slider' );
    			}
    		}
    	?>
    	<!-- / slider -->
    
    	<!-- home page contents -->
    
    		<?php
    		//home pae content
    		$home_page=array(
    		    'post_type'=> 'home_page',
    		    'post_status'=> 'publish',
    		    'ignore_sticky_posts'=>1,
    		    'showposts' => 1000,
    		    'orderby'=> 'date',
    		    'order' => 'ASC',
    		    'cat' => -0,
    		);

    and here bottom part of code from header.php:

    <!-- content -->
    	<div id="content">
    		<?php if(	(( get_option(THEMESLUG."_slider_active") && is_front_page()) || is_front_page() ) && (!get_option(THEMESLUG.'_remove_curvs')) ) echo '<div class="slider_cover"></div>';  ?>
    		<div class="content_top <?php if(get_option(THEMESLUG.'_remove_curvs') && !is_front_page()):?>no_curv<?php endif;?> <?php if(get_option(THEMESLUG.'_remove_curvs') && is_front_page()):?>no_curv_home<?php endif;?> "></div>
    		<div class="content">

    I’m sure it’s simple code, but everything I tried fails to even show the image at all.

    Thanks for your time.

  • The topic ‘Adding custom header on homepage only’ is closed to new replies.