• Resolved fanboi

    (@fanboi)


    I’m customizing the Desktop Chaos theme. The original theme used html text for the blog title, bit I wanted to use a logo. There was no header graphic (header is built into a large background image – that goes behind content area AND header)

    I added an invisible gif to the section of the stylesheet css and then added the following code (taken from a site that has clickable header) to make that area clickable…

    <div id="blog-title .title" onclick="location.href='https://thejordanpease.com/test/';" style="cursor: pointer;">

    but it made the WHOLE PAGE clickable, not just the “blog-title .title” area. Although other buttons work fine, clicking in the search box sets it off – which disables search.

    HELP?

Viewing 11 replies - 31 through 41 (of 41 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    If you’re adding an onclick to the div, then yeah, the whole page will be clickable, since that div covers the page.

    Thread Starter fanboi

    (@fanboi)

    no special plugins running.

    I’m so confused…

    I just looked at page source and I see the code you mention…

    but when I compare that code to the php files I see in theme editor – I can’t find which one that code is coming from. I have no idea how source relates to the php files.

    code in index.php says…

    <span class="title"><a href="https://thejordanpease.com/test/"><img src="https://thejordanpease.com/test/wp-content/themes/the-jordan-pease/images/invisible.gif"></a></span>

    I checked home.php, header.php and rest of php and I don’t see where code that Rich ‘elfin’ Pedley found in source.

    Why is this so complicated?

    Thread Starter fanboi

    (@fanboi)

    If it helps I can zip the php files and post a link…

    https://thejordanpease.com/test/customized-desktop-chaos.zip

    Anonymous User

    (@anonymized-3085)

    I have a feeling you maybe editing the wrong file, and hence we aren’t seeing your changes.

    As I’m not familiar with the theme I can’t tell you which file to edit – so you are going to have to go through each and every file and look for:
    <div id="blog-title"> as I have a feeling it may be in more than once.

    Thread Starter fanboi

    (@fanboi)

    i used theme editor and looked in each php file in the menu… I used browser’s search to scan the code for part of the url (pease) – and it only shows up on index.php – but its context I said, not what shows up when viewing page source

    I don’t see that code in any of them. Are there files that I can’t get to via theme editor?

    Anonymous User

    (@anonymized-3085)

    Ok I’ve had a quick look, this may seem a strange suggestion, but can you rename home.php to home-page.php

    Thread Starter fanboi

    (@fanboi)

    umm. theoretically I suppose I could. but won’t that screw up all the pages that look for home.php?

    Anonymous User

    (@anonymized-3085)

    don’t worry about that at the moment – it can always be reverted after if it causes a major issue.

    Thread Starter fanboi

    (@fanboi)

    OK PROGRESS!!!

    I did that and it seems to make the clickable header work – but only on the blog page – so I went ahead and added same code from index.php to page.php so it works on all pages.

    <span class="title"><a href="https://thejordanpease.com/test/"><img src="https://thejordanpease.com/test/wp-content/themes/the-jordan-pease/images/invisible.gif"></a></span>

    only 1 small prob… there is an odd black line on top and left edges of invisible gif (bright green streak is just there temporarily so one can see where the gif is.) The black lines are NOT part of the invisible gif file, so not sure where they coming from.

    Anonymous User

    (@anonymized-3085)

    it’s the border on the image because of the link, see border:0; for that image via CSS and it will remove it.

    Thread Starter fanboi

    (@fanboi)

    That did it THANKS SO MUCH!!!!! Your help is Oh SO Appreciated!

Viewing 11 replies - 31 through 41 (of 41 total)
  • The topic ‘Need help with making clickable header’ is closed to new replies.