WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to change header images on different pages (4 posts)

  1. Peggy
    Member
    Posted 1 year ago #

    I am a total beginner with php and am having trouble with changing header images. The website was already partially started when it was given to me and like I said I'm a beginner in php.

    I was able to successfully change the image on the "our history" and "Travel and Experience" pages, using the following:

    <?php
    if(is_page('Travel & Experiences')){ ?> <div id="header-image3" class="clearfix">
    <div class="clientslides">
    </div></div>
    <?php } ?>

    But I am still seeing the header that was originally there behind it, also there is a slider image (you can see it moving on the left side of the "our history" page.)that is showing behind the new header I just added but it should be in front! I am really confused how to remove the original image and have the slider in front. Here is the php code used in header.php:

    <body <?php body_class(); ?>>
    
    <div id="wrap" class="clearfix"><!-- this encompasses the entire Web site except the footer and copyright -->
    
    <div class="container" id="container-full">
    
      <header class="clearfix" id="top-header">
    
         <?php if (is_front_page()) { ?> <div id="header-image" class="clearfix">
              <?php if ( function_exists('show_skitter') ) { show_skitter(); } ?>
    		<!---<img alt="Leadership League" src="<?php echo get_option('siteurl') ?>/wp-content/themes/azure-basic/images/slide1.jpg">--->
    
    	</div><!--#header-image-->
        <?php } else { ?>
        <div id="header-image2" class="clearfix">
          <div class="clientslides">
         <?php echo do_shortcode('[thethe-image-slider name="Clients"]');?>
        </div>
    	</div><!--#header-image-->
    	 <?php } ?>
    
    <?php
    if(is_page('Travel & Experiences')){ ?> <div id="header-image3" class="clearfix">
    <div class="clientslides">
    </div></div>
    <?php } ?>
    
    <?php
    if(is_page('Our History')){ ?> <div id="header-image4" class="clearfix">
    <div class="clientslides">
    </div></div>
    <?php } ?>
    
         <div class="logo"><a href="/"><img alt="Leadership League" src="<?php echo get_option('siteurl') ?>/wp-content/themes/azure-basic/images/logo.png"></a></div>
    
         <nav id="access" role="navigation" class="clearfix">
    
    		<?php /* The navigation menu.  If it isn't filled out, wp_nav_menu falls back to wp_page_menu. The menu assiged to the primary position is the one used. If none is assigned, the menu with the lowest ID is used. */ ?>
    
    		<?php wp_nav_menu( array( 'before' => '<span>', 'after' => '</span>', 'theme_location' => 'primary' ) ); ?>
    
    	</nav><!-- #access -->
    
        <div class="clear"></div><!-- .clear the floats -->
    
      </header>
    
      <div class="clear"></div><!-- .clear the floats -->
    
      <div id="main" class="clearfix">

    [please mark any posted code - http://codex.wordpress.org/Forum_Welcome#Posting_Code - the above is partially corrupted by the forum's parser]
    Can someone please help me fix this and understand it?

    Thank you!

  2. Peggy
    Member
    Posted 1 year ago #

    Sorry I forgot to post the site: http://rachel-and-alex.us

  3. Peggy
    Member
    Posted 1 year ago #

    I figured out how to bring the slider in front of the image, now I'm stuck on the old image showing behind the new image. I'm thinking it need to have an else if statement? But I'm not sure how to make it work! Any help would be so appreciated! Thank you!!

  4. Peggy
    Member
    Posted 1 year ago #

    Thank you if anyone was trying to help me, but after learning a little bit more about php I figured it out!!

Topic Closed

This topic has been closed to new replies.

About this Topic