Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #132462
    Christian
    Participant

    hey,

    howcan I change the “URL” link from the Logo or the Header ?

    Greetings Chris

    #132516
    Skandha
    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,
    Skandha

    #132525
    Christian
    Participant

    Hey Skandha, thx it works. 🙂

    Can I open the url in new window?

    #132536
    Skandha
    Participant

    @rudicash: To open the URL in a new window add target="_blank" after rel="home" in the previous code.

    Let me know if this works.

    Regards,
    Skandha

    #132548
    Christian
    Participant

    Yes, very cool!

    Thx

    Greetings

    Chris

    #132581
    Skandha
    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

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Change Link from logo or header’ is closed to new replies.