1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

need help with making the header clickable

Discussion in 'HTML & Website Design' started by aspire, Nov 23, 2015.

  1. #1
    Hi,

    On this site - gilbertconstruct (dot) com

    I wanted to make the header image of this site clickable - when clicked on the header image it should redirect to the homepage. Can't figure out where to make the change in the header file

    Please suggest.
     
    aspire, Nov 23, 2015 IP
  2. Ivan S

    Ivan S Member

    Messages:
    90
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    48
    #2
    It is WP site and I'm confused by how you don't have Option for clickable logo.

    Maybe to use this code and make your <div id="header"> clickable

    <a href="http://www.gilbertconstruct.com/">

    <span></span>

    </a>
     
    Ivan S, Nov 23, 2015 IP
  3. aspire

    aspire Well-Known Member

    Messages:
    4,003
    Likes Received:
    76
    Best Answers:
    0
    Trophy Points:
    175
    #3
    Where to place this code in the header.php

    I placed it right after <div id="Header">

    But it's not working.
     
    aspire, Nov 23, 2015 IP
  4. Ivan S

    Ivan S Member

    Messages:
    90
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    48
    #4
    Give me header.php code
     
    Ivan S, Nov 23, 2015 IP
    aspire likes this.
  5. Global AD Media

    Global AD Media Greenhorn

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #5
    Hi,
    you go with admin panel then visit or click all pages then see in right column.
     
    Global AD Media, Nov 23, 2015 IP
  6. hdewantara

    hdewantara Well-Known Member

    Messages:
    536
    Likes Received:
    47
    Best Answers:
    25
    Trophy Points:
    155
    #6
    Hi.
    Not sure too how to code WP the "proper way" but let's see if the following works.

    Currently I see Header element to have structure:
    <div id="Header">
            <a href="http://www.gilbertconstruct.com/">
            <span></span>
            </a>  
    
    
            <div id="Logo">
                            <span></span>
            </div>
    
                    <!--<form method="get" id="searchform" action="/index.php">
                    <input type="text" value="Search Blog..." name="s" id="s" />
                    </form>-->
    
    
        </div>
    HTML:
    But if you could restructure it "somehow" to be like below, the link might just work?
    <div id="Header">
      <a href="http://www.gilbertconstruct.com/">
        <img src="http://www.gilbertconstruct.com/wp-content/themes/limesquash/limesquash/images/header1.jpg"></a>
    </div>
    HTML:
     
    hdewantara, Nov 23, 2015 IP
    webcosmo and aspire like this.
  7. aspire

    aspire Well-Known Member

    Messages:
    4,003
    Likes Received:
    76
    Best Answers:
    0
    Trophy Points:
    175
    #7
    Perfect. Works good. Thank you so much for your help. Liked you up.;)
     
    aspire, Nov 23, 2015 IP
  8. th.sigit

    th.sigit Well-Known Member

    Messages:
    178
    Likes Received:
    32
    Best Answers:
    1
    Trophy Points:
    135
    #8
    Your current HTML output:
    <div id="Header">
            <a href="http://www.gilbertconstruct.com/">
            <span></span>
            </a> 
    
    
            <div id="Logo">
                            <span></span>
            </div>
    
                    <!--<form method="get" id="searchform" action="/index.php">
                    <input type="text" value="Search Blog..." name="s" id="s" />
                    </form>-->
    
    
        </div>
    Code (markup):
    Look at these lines,

            <a href="http://www.gilbertconstruct.com/">
            <span></span>
            </a>   
    Code (markup):
    The following should exist before the closing </a> tag above:

            <div id="Logo">
                            <span></span>
            </div>
    Code (markup):
    Now, this is the original header.php from your theme (downloaded from http://www.freethemelayouts.com/showcase/limesquash-theme/.)

            <div id="Logo">
                <?php bloginfo('name'); ?>
                <span><?php bloginfo('description'); ?></span>
            </div>
    Code (markup):
    As per https://codex.wordpress.org/Designing_Headers, you can modify those lines to look like the following:

            <div id="Logo">
                <a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a>
                <span><?php bloginfo('description'); ?></span>
            </div>
    Code (markup):
    EDIT:
    Wrote my reply while you were editing your site, seems that things are in place now *laugh*.

    I leave my reply unchanged as a reference for others who might need some help.
     
    th.sigit, Nov 23, 2015 IP