• Resolved xerxes83

    (@xerxes83)


    Hi.

    Im trying to change the hyperlink of the header logo on my website. Im new to WordPress and this is my first website.

    Thanks for taking the time!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Theme Author Fruitful Code

    (@fruitfulcode)

    xerxes83,

    It’s possible only to edit source files. fruitful/functions.php line 473

    function fruitful_get_logo

    echo  '<a href="' . esc_url( home_url( '/' ) ) . '" title="' . $description .'" rel="home"><img class="logo" src="'. $url_logo  .'" alt="' . $description . '"/></a>';
    	} else {
    		echo  '<a class="logo-description" href="' . esc_url( home_url( '/' ) ) . '" title="' . $description .'" rel="home"><h1 class="site-title">'. $name .'</h1><h2 class="site-description">'. $description .'</h2></a>';
    	}

    Replace href=”” ' . esc_url( home_url( '/' ) ) . ' on your own link

    Thread Starter xerxes83

    (@xerxes83)

    Hi. I did that and my page disappeared. I try to access it and not even WordPress login is there… The screen is only white.

    Theme Author Fruitful Code

    (@fruitfulcode)

    xerxes83,

    If you don’t have developer skills, it’s hard to change the code.

    If you enable wp-debug you will errors, which appear after your changes.

    Thread Starter xerxes83

    (@xerxes83)

    Fruitful Code,

    I told you Im new with this. So yes it is hard. I think its sad that your reply to my error is ” if I don’t have developers skills, it’s hard to change the code”…

    Well I had to go in the source code of the theme in Filezilla to change it back there. And reload the function.php. Now its back to what it was.

    Still Im trying to change the hyperlink of the logo. Do you have a better Idea? Didi you mean i should change: href=”” ‘ . esc_url( home_url( ‘/’ ) ) . ‘ to http://www.somthing.com, like this:

    echo ‘<img class=”logo” src=”‘. $url_logo .'” alt=”‘ . $description . ‘”/>‘;
    } else {

    }
    or:

    echo ‘<img class=”logo” src=”‘. $url_logo .'” alt=”‘ . $description . ‘”/>‘;
    } else {
    echo ‘<h1 class=”site-title”>’. $name .'</h1><h2 class=”site-description”>’. $description .'</h2>‘;
    }
    }
    }

    I did the last one. Do I need to have the . on each side like this . http://www.somthing.com . in the code or as it shows above?

    Thread Starter xerxes83

    (@xerxes83)

    Could you just show me how it should look like: this is a example link: http://www.name.com

    Thanks

    Theme Author Fruitful Code

    (@fruitfulcode)

    xerxes83,

    Can you describe please. If you have current website with Fruitful theme on board.
    You upload logo via theme options, and your logo point to your website url.

    Why do you need change this base functionality?

    In my first reply, replace href="" ' . esc_url( home_url( '/' ) ) . ' on your own link, means:

    if ($url_logo_id != "") {
    		$url_logo = wp_get_attachment_image_src($url_logo_id, 'full');
    		$url_logo = esc_url_raw($url_logo[0]);
    		echo  '<a href="http://www.somthing.com" title="' . $description .'" rel="home"><img class="logo" src="'. $url_logo  .'" alt="' . $description . '"/></a>';
    	} else {
    		echo  '<a class="logo-description" href="http://www.somthing.com" title="' . $description .'" rel="home"><h1 class="site-title">'. $name .'</h1><h2 class="site-description">'. $description .'</h2></a>';
    	}
    Thread Starter xerxes83

    (@xerxes83)

    Thanks!
    No it works!

    Im working in a partnership with a company. Im using there logo because my company is a department next to them. Therefor I had to change the link so it would go to there site when accessing the logo link.

    But now it works!

    Thanks!

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

The topic ‘Change Logo Hyperling’ is closed to new replies.