• i’m using the arras theme for my web site.

    i want to make my header link back to the homepage, but i’ve run into a problem with using the search bar. when users go to click on the search bar the page reloads before they have a chances to enter their search.

    i reverted back to the original header.php code and the search bar works fine again it’s just the image doesnt link anymore. any suggestions?
    thanks!

    header link code:
    <div id="header" onclick="location.href='https://www.currentdose.com/';" style="cursor: pointer;">

Viewing 7 replies - 1 through 7 (of 7 total)
  • That code won’t work properly because your search form is effectively part of your header. You’d need to to a lot more theme editing to make most of your header clickable without it impacting on your search bar.

    Thread Starter michael-shedd

    (@michael-shedd)

    can i make an image map?

    i used a program called gimp to come up with this:

    <map name="map">
    <!-- #$-:Image map file created by GIMP Image Map plug-in -->
    <!-- #$-:GIMP Image Map plug-in by Maurits Rijk -->
    <!-- #$-:Please do not edit lines starting with "#$" -->
    <!-- #$VERSION:2.3 -->
    <!-- #$AUTHOR:Christopher Shedd -->
    <area shape="poly" coords="109,0,108,236,759,236,760,185,978,186,1068,186,1067,0,1065,0" href="https://www.currentdose.com" />
    <area shape="rect" coords="66,0,100,171" href="https://www.elus1v.com" />
    </map>

    if i inserted this in the header tab
    <div id=”header”>
    (of course in the right place) would it work?

    thanks for the help

    I doubt that will work.

    Thread Starter michael-shedd

    (@michael-shedd)

    hmm alright thanks tho!

    What you need to do, as far as I can see, is insert another div block within the header and set its width to about 500px in your stylesheet and add the onlick function to this block instead. So something like:

    <div id="header">
    <div id="header_link" onclick="location.href='https://www.currentdose.com/';" style="cursor: pointer;">
    </div>

    Then in your stylesheet, add:

    #header_link{
    width:500px;
    height:237px;
    }

    I think that might work.

    Thread Starter michael-shedd

    (@michael-shedd)

    thanks esmi as always… u seem to always be super helpful i gave that a wing and nothing seemed to change. does it matter the placement in either of those files?

    in my header i tried adding this above then below the <div id=”header”> in the header.php

    <div id="header">
    <div id="header_link" onclick="location.href='https://www.currentdose.com/';" style="cursor: pointer;">
    </div>

    i also replaced the <div id=”header”> with <div id=”header_link” onclick=”location.href=’https://www.currentdose.com/&#8217;;” style=”cursor: pointer;”>

    as for the stylesheet portion i just threw it in the that file.

    nothing worked, but i’m not too great with the coding part of wordpress

    Thread Starter michael-shedd

    (@michael-shedd)

    well i didnt change it just didnt work… is what i should say. one time i had to header images and the second time i my original problem where i would click the search bar it would reload the page

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘header links to homepage but search bar doesnt work anymore’ is closed to new replies.