-
AuthorPosts
-
March 27, 2014 at 8:31 pm #244053
Hey Guys!
I found this old post that covers how to change the link that the logo points to: https://kriesi.at/support/topic/change-logo-link-in-enfold-remove-comment-counts-from-post-silder/
I found the file specified in the post and found the referenced code to look for – here it is:
{ $logo = get_bloginfo('name'); if($use_image) $logo = "<img src='{$use_image}' alt='{$alt}' title='{$logo}'/>"; $logo = "<$headline_type class='logo bg-logo'><a href='".home_url('/')."'>".$logo."$sub</a></$headline_type>"; }
However, I noticed the previous post I’m referencing mentions I’d see:
".$link."
I’m assuming this page has changed since that last post since I couldn’t find that code. If I edit the above code to change the URL I’m assuming I’d do the following:
{ $logo = get_bloginfo('name'); if($use_image) $logo = "<img src='{$use_image}' alt='{$alt}' title='{$logo}'/>"; $logo = "<$headline_type class='logo bg-logo'><a href='".home_url('http://myurl.com')."'>".$logo."$sub</a></$headline_type>"; }
Is that correct? Also, could I copy this file to the child theme and have it work or do I have to edit the parent theme file?
Thanks for your help!!
March 28, 2014 at 7:17 am #244217Hi Redsand747!
Thank you for using the theme!
If you like to redirect the logo link, you can add something like this on functions.php:
add_filter('avf_logo_link', 'avf_redirect_logo_link'); function avf_redirect_logo_link($link) { $link = 'http://www.google.com'; return $link; }
Change the $link url. :)
Regards,
IsmaelMarch 28, 2014 at 1:49 pm #244340Hey Ismael,
Awesome, that’s perfect!! I’ll give it a shot. I did end up just editing the parent theme file and that worked. I also found out that adding this file to the child theme and editing it doesn’t do anything, so that’s good to know too.
Although, sine the parent theme edit will get overwritten with the next theme update I’ll be sure to go ahead and try this addition to the functions.php – much more convenient.
Thanks and have a great day!
-
AuthorPosts
- The topic ‘Replace Logo Link With a New One’ is closed to new replies.