Placing a hyperlink image into my wordpress header template

Discussion in 'WordPress' started by Golly, Feb 24, 2012.

  1. #1
    Hi there,

    I am a php novice. I am trying to place a hyperlink image (in fact a few images) into my themes header. I want to place flags with links to the relevant sites under the rss + twitter area. Here is the site - http://www.gardnertackle.co.uk/. I do not know the best way to do this. I have tried placing them in using html image tags, which hasn't worked for me yet (mjaybe I am just putting them in the wrong place?). I have also tried using css divs #flag_area, without any luck. Here is the header code:

    <div id="header">
    <div id="flag_area"></div>
       <?php if ($options['use_logo']) : ?>
       <div id="logo_image">
        <h1><a href="<?php echo get_option('home'); ?>/"><img src="<?php bloginfo('template_url'); ?>/img/<?php echo $options['logo_name']; ?>" title="<?php bloginfo('name'); ?>" alt="<?php bloginfo('name'); ?>" /></a></h1>
       </div>
       <?php else : ?>
       <div id="logo">
        <a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a>
        <h1><?php bloginfo('description'); ?></h1>
       </div>
       <?php endif; ?>
    <a href="my_affiliate_link"><img src="my_affiliate_img_url" /></a>
       <div id="header_meta">
    
        <?php if ($options['header_search']) : ?>
        <div id="search-area"<?php if (!$options['header_rss']&&!$options['header_twitter']) : echo ' style="margin-right:0;"'; endif; ?>>
         <?php if ($options['use_google_search']) : ?>
         <form action="http://www.google.com/cse" method="get" id="searchform">
          <div><input type="text" value="<?php _e('Google Search','piano-black'); ?>" name="q" id="search-input" onfocus="this.value=''; changefc('white');" /></div>
          <div>
           <input type="image" src="<?php bloginfo('template_url'); ?>/img/search-button.gif" name="sa" alt="<?php _e('Search from this blog.','piano-black'); ?>" title="<?php _e('Search from this blog.','piano-black'); ?>" id="search-button" />
           <input type="hidden" name="cx" value="<?php echo $options['custom_search_id']; ?>" />
           <input type="hidden" name="ie" value="UTF-8" />
          </div>
         </form>
         <?php else: ?>
          <form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
           <div><input type="text" value="<?php _e('Search','piano-black'); ?>" name="s" id="search-input" onfocus="this.value=''; changefc('white');" /></div>
           <div><input type="image" src="<?php bloginfo('template_url'); ?>/img/search-button.gif" alt="<?php _e('Search from this blog.','piano-black'); ?>" title="<?php _e('Search from this blog.','piano-black'); ?>" id="search-button" /></div>
          </form>
         <?php endif; ?>
        </div>
        <?php endif; ?>
    
        <?php if ($options['header_rss']) : ?>
        <a href="<?php bloginfo('rss2_url'); ?>" id="rss-feed" title="<?php _e('Entries RSS','piano-black'); ?>" ><?php _e('RSS','piano-black'); ?></a>
        <?php endif; ?>
        <?php if ($options['header_twitter']) : ?>
        <a href="<?php echo $options['twitter_url']; ?>" id="twitter" title="<?php _e('Twitter','piano-black'); ?>" ><?php _e('Twitter','piano-black'); ?></a>
        <?php endif; ?>
    
       </div><!-- #header_meta end -->
       
      </div><!-- #header end -->
    Code (markup):
    Can someone please advise as I am losing my mind here?

    Thanks
     
    Golly, Feb 24, 2012 IP
  2. hmansfield

    hmansfield Guest

    Messages:
    7,904
    Likes Received:
    298
    Best Answers:
    0
    Trophy Points:
    280
    #2
    Where do you want to place them in the header, and can we see the site so that we can try and direct you?
    Link please.
     
    hmansfield, Feb 24, 2012 IP
  3. inayah

    inayah Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Could be this help for you "www.solostream.com/blog/tutorials/how-to-add-a-header-image-to-the-simplicity-wordpress-theme/"
     
    inayah, Feb 25, 2012 IP