Support » Themes and Templates » header links to homepage but search bar doesnt work anymore

  • 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?

    header link code:
    <div id="header" onclick="location.href='';" style="cursor: pointer;">

Viewing 7 replies - 1 through 7 (of 7 total)
  • esmi


    Forum Moderator

    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.

    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="" />
    <area shape="rect" coords="66,0,100,171" href="" />

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

    thanks for the help



    Forum Moderator

    I doubt that will work.

    hmm alright thanks tho!



    Forum Moderator

    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='';" style="cursor: pointer;">

    Then in your stylesheet, add:


    I think that might work.

    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='';" style="cursor: pointer;">

    i also replaced the <div id=”header”> with <div id=”header_link” onclick=”location.href=’’;” 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

    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.