Support » Fixing WordPress » How do i make the header IMAGE clickable ?

  • [ Moderator note: moved to Fixing WordPress. Please do not use Developing With WordPress for these topics. ]

    So basically I want to make my header image clickable . It is a full size image , the exact same size as my header’s width ( not a simple logo ) . My theme does have a clickable option for the logo but it is kind of screwed up because I want my site to look exactly the way it looks right now and the logo option doesn’t support that even with advanced CSS editing.

    I want the image I have at the moment on my header to be linked to my homepage.

    *** Side note , I know CSS and HTML , I don’t know PHP ( i can tell what it does but I can’t write it myself ) .

    I opened the header.php and found nothing in there . Is there any way I can just edit the HTML of my site ??? Why are people forced to deal with php on wordpress, it should only be CSS and HTML + Javascript and Jquiry to change certain theme functions but that’s about it .

    Anyway , if someone knows how to do that , I would really appriciate it .

    My biggest problem with wordpress is that whenever I need to make an edit like this one , I just don’t know what to open in order to do it , like I said the built in editor uses php and the biggest problem with that is the function names , how am I supposed to know which element of my theme is named what in php .

Viewing 5 replies - 1 through 5 (of 5 total)
  • Which theme are you using?

    If you are using a commercial theme, you will need to contact your theme developer.

    If you are using a theme from wordpress.org, you should post your query in that theme’s dedicated support forum.

    Either way, the recommended way to do this is via a child theme, because you can copy over the theme’s file that controls the header image (whichever that is) to your child theme and make the changes there.

    Thread Starter miro011

    (@miro011)

    I actually solved this myself after a few attempts. here is what I did if anyone is wondering , I went to my header.php in editor , I found the piece of text that corresponds to the header image and added :

    style=”cursor: pointer;” onclick=”location.href=’LINK TO HOMEPAGE HERE’;”

    So this is what the header image piece looks like OVERALL :

    <header id=”masthead” class=”site-header” role=”banner” style=”cursor: pointer;<?php storefront_header_styles(); ?>” onclick=”location.href=’LINK TO HOMEPAGE HERE’;”>

    Again, though, do this in a child theme, or your changes will be obliterated the next time your theme updates. (Also, please use the code button when pasting code, as parts of your code may disappear when you post if you don’t. — Thanks.)

    Thread Starter miro011

    (@miro011)

    I don’t know. I will look into creating a child . I’ve never ever done that before but I might this time. I have made so many changes to my theme , especially with the CSS . I had an update a few weeks ago and accidently updating the theme and had to do some many things over so I just told myself I will never update my theme again lol .

    If making a child is as simple as copying all my current files I will do it but if I will have to do all the CSS changes and adding / removing functions again I guess I will pass.

    Last update for my theme they actually changed a few nemaes ( classses ) of certain elements which is really stupid IMO , even with a child theme , I would need to make changes again .

    Don’t worry about child theme , I will read about that somewhere . Is there a way to make a back-up of the current version theme that I have , so that even if an update happens and things get screwed , I can just go back to the previous version ?

    You can download the current version of your theme via FTP.

    As for creating a child theme, keep in mind that you should never copy over the entire theme’s files; just those files you need to make changes to. Also, your child theme’s stylesheet should just contain those elements you need to change; you shouldn’t copy the entire parent style sheet completely.

    There are plugins that will help you create a child theme.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How do i make the header IMAGE clickable ?’ is closed to new replies.