Custom Logo URL

Home Forums Flash Free Custom Logo URL

This topic contains 1 reply, has 2 voices, and was last updated by  Nima 9 months, 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #1324512


    Hello I was wondering if someone knows how I can make my logo to have a custom URL. I’ve tried researching it and all the PHP I’ve used has been bad and nothing seems to be working for me. However, if someone has worked with this theme and might know how to change the logo url link that would be greatly appreciated. Thank you!



    Hi mclaingma,

    To change the custom logo URL a little modification is required in one of the custom logo function.
    Before editing any code in the theme please create the child theme and know it’s benefits and also you can download the direct child theme ZIP file from below link:

    Tutorial on Creating WordPress Child Theme

    Now, in the child theme please open the file functions.php where add the below provided code:

    add_filter( 'get_custom_logo', 'flash_update_logo_link' );
    function flash_update_logo_link() {
        $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>',
                wp_get_attachment_image( $custom_logo_id, 'full', false, array(
                    'class'    => 'custom-logo',
                ) )
        return $html;   

    In the above code you can add your preferred URL in place of ‘’.

    ThemeGrill Support Team

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.