• Resolved zgarcia

    (@zgarcia)


    I upgraded to 2.8 and it wiped out all the code in my header including my Google analytics and advertising… But the bigger frustration is that I can’t find a code fix to make the header link back to the home page… Users could click on the header image and get back to the front page https://www.ichromis.com/blog/

    Any help would be appreciated.

    ZG

Viewing 13 replies - 1 through 13 (of 13 total)
  • In your styles.css try adding the following:

    #header a {
    display:block;
    height: 192px;
    width: 740px;
    }
    You can put a border around it too while your testing to see where the link is and how big and then adjust the size.

    Thread Starter zgarcia

    (@zgarcia)

    All I want to do is make the entire kubrickheader.jpg a link to https://www.ichromis.com/blog/ It used to be done in the header.php so it would carry over to every page. Now in 2.8 where I would normally put it looks like this:

    <div id="header" role="banner">
    	<div id="headerimg">
    		<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
    		<div class="description"><?php bloginfo('description'); ?></div>
    	</div>

    I have this exact same problem!
    Any luck finding a solution?

    Thread Starter zgarcia

    (@zgarcia)

    No luck… Anybody???

    Did you wrap it in a link yet? I mean wrapping it in <a href="link"></a> This works when you wrap it around an inline image and should work to make a divider clickable..

    That would result in nested links – which would in turn invalidate that code block. It could also create some rather unpredictable results cross-browser.

    crondeau’s solution should work.

    Yes, it should. Zgarcia, did you try the suggested css?

    I tried adding the code to the css but it didn’t seem to do anything but i did just copy and past it anywhere. If it requires more knowledge than that can someone please help? I really need some step by step instructions on how to make this work.
    Any help would be appreciated.

    I got mine to work. I’ve no idea if it’s a good solution but it works.
    Change the first line from
    <div id=”header” role=”banner”>

    to

    <div id=”header” role=”banner” onclick=”location.href='<?php echo get_option(‘home’); ?>/’;” style=”cursor: pointer;”>

    Hope this helps!

    Thread Starter zgarcia

    (@zgarcia)

    That worked perfectly!

    Thanks hungryheffy!

    hungryheffy,
    Can you rewrite that so I could put in an actual URL? I’d like my header image to point to the home page of my site, rather than my blog, but keep the blog title as a link to the blog’s home page.
    Ellen

    Hey Ellen, couldn’t you just change

    <div id=”header” role=”banner” onclick=”location.href='<?php echo get_option(‘home’); ?>/’;” style=”cursor: pointer;”>

    to

    <div id=”header” role=”banner” onclick=”location.href=’https://www.merchaholic.ca&#8217;;”>

    When I left that style of the cursor as pointer that’s what was on my whole page so I got rid of it.

    Hmmzz, now I know why the pointer was on the whole page… My WHOLE page is clickable as a link back to my main site lmfao. How’s that fixed? Must be somethin’ easy.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Header Link in 2.8’ is closed to new replies.