• Resolved ChadXSO

    (@chadxso)


    Here is the site I am talking about https://davidhornbrook.com/wordpress/
    I want it so that when someone clocks his logo (header image) it takes them to davidhornbrook.com not, davidhornbrook.com/wordpress
    Should be a simple thing, I just haven’t figured it out yet.
    I want this to be the default location it sends people to (when they click the logo/header image) regardless of what page they are on
    I only started today. Any help would be appreciated

Viewing 13 replies - 1 through 13 (of 13 total)
  • Go to the header.php

    Find this bit of code:

    <a href="<?php echo esc_url( home_url( '/' ) ); ?>">

    Replace with:

    <a href="https://davidhornbrook.com/">

    Should work – else ask again.

    Thread Starter ChadXSO

    (@chadxso)

    OK! I found header.php
    This is what I have now
    <h1 id="site-title"><span><<a href="https://davidhornbrook.com/"> title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1>

    And now it does not display the titles correctly.
    Also, it does not link to the website.
    Did I do something wrong?

    Thread Starter ChadXSO

    (@chadxso)

    Sorry ’bout that. I had some issues with posting my code in there.
    I still don’t have it working. But thanks for helping

    <h1 id="site-title"><span><<a href="https://davidhornbrook.com/"> title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1>

    THis should be:

    <h1 id="site-title"><span><a href="https://davidhornbrook.com/"> title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1>

    An extra “<”

    —-

    Also this is not what you originally asked. I thought you only wanted the header image to point towards your main page.

    Search for the exact code I posted above and replace that to get the header image to point the main page.

    —-

    Should be it

    Do a search and paste that bit of code.

    Its CTRL+F in Firefox!

    Then you can replace it.

    Thread Starter ChadXSO

    (@chadxso)

    Thx Pixelrow!
    I did remove the extra “<” and you can see that when you go to https://davidhornbrook.com/wordpress/
    that it does not display correctly, nor does the header link to hornbook.com, it still goes to davidhornbrook.com/wordpress.

    Thread Starter ChadXSO

    (@chadxso)

    I can find the code that you had me type in when I view source, so I know it’s there
    Heck, I am willing to let you remote view my machine or give you FTP access to the site!
    my *mail
    chad at hornbrook.com

    Sorry I didn’t spot this but you had two extra “>”

    <h1 id="site-title"><span><a href="https://davidhornbrook.com/" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1>

    This should work!


    I can find the code that you had me type in when I view source, so I know it’s there
    Heck, I am willing to let you remote view my machine or give you FTP access to the site!
    my *mail
    chad at hornbrook.com

    If you can find the code then replace it – I don’t get what your problem is with the header image bit.

    By the way – you are meant to find that in your header.php file!

    Tell you what use Pastebin.com to paste the whole content of your header.php and send the link.

    I’ll add what you want and send it back.

    Thread Starter ChadXSO

    (@chadxso)

    OK, I think I did this right
    Here is the Pastebin link

    https://pastebin.com/Q0XEttda
    It has the the Title Header Problem

    This is the Header.php file that is located in
    /davidhornbrook/wordpress/wp-content/themes/twentyeleven
    of the actual website

    I just want it so that when they click on this image (wherever it appears i.e. all his wordpress pages) it takes them to his site, not the wordpress site

    Thx again for all of your help!!!

    Thread Starter ChadXSO

    (@chadxso)

    I noticed that the Text that says “David’s Blog” is what links to his site. I need the Image (the logo) to link to his site.

    Sorry for the confusion.

    Thread Starter ChadXSO

    (@chadxso)

    I want to change where the Image that I used (logo) hyperlinks to. Right now it hyperlinks to wordpress
    davidhornbrook.com/wordpress
    and I want it to link to the actual site
    davidhornbrook.com
    Thx for any input.

    There you go:

    https://pastebin.com/DxmEXnnr

    This should make the header image link to https://davidhornbrook.com/

    Copy and paste it into the header.php

    Thread Starter ChadXSO

    (@chadxso)

    Thx Pixelrow!
    I now have out working thanks to you!!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Change hyperlink on header’ is closed to new replies.