Tagged: header url
- This topic has 5 replies, 2 voices, and was last updated 5 years, 7 months ago by
Skandha.
-
AuthorPosts
-
February 27, 2018 at 9:31 am #132462
Christian
Participanthey,
howcan I change the “URL” link from the Logo or the Header ?
Greetings Chris
February 28, 2018 at 2:00 am #132516Skandha
Participant@rudicash: You will need to create a child theme and add the following code in your functions.php file. If you don’t know how to create a child theme you can use the following plugin to generate a child theme.
add_filter( 'get_custom_logo', 'change_logo_url' ); function change_logo_url() { $custom_logo_id = get_theme_mod( 'custom_logo' ); $html = sprintf( '<a href="%1$s" class="custom-logo-link" rel="home" itemprop="url">%2$s</a>', esc_url( 'www.google.com' ), wp_get_attachment_image( $custom_logo_id, 'full', false, array( 'class' => 'custom-logo', ) ) ); return $html; }
Replace the %1$s text with your URL.
Let me know if this solves your issue!Regards,
SkandhaFebruary 28, 2018 at 3:22 am #132525Christian
ParticipantHey Skandha, thx it works. 🙂
Can I open the url in new window?
February 28, 2018 at 3:28 am #132536Skandha
Participant@rudicash: To open the URL in a new window add
target="_blank"
afterrel="home"
in the previous code.Let me know if this works.
Regards,
SkandhaFebruary 28, 2018 at 7:31 am #132548Christian
ParticipantYes, very cool!
Thx
Greetings
Chris
February 28, 2018 at 11:10 pm #132581Skandha
Participant@rudicash: Hello there,I hope I was able to resolve your issue. If it’s not too much trouble, I have a quick request: could you please leave an honest review?
https://wordpress.org/support/theme/catch-box/reviews/#new-post
Your review will help others know what to expect when they’re looking for the support I offer. Even a sentence or two would be hugely appreciated. Thanks, and if there’s anything else at all that I can do to help,
don’t hesitate to let me know.Regards,
Skandha -
AuthorPosts
- The topic ‘Change Link from logo or header’ is closed to new replies.