Remove link from WordPress Custom Logo

add_filter( 'get_custom_logo',  'owp_child_remove_logo_link' );

function owp_child_remove_logo_link( $html ) {
    $custom_logo_id = get_theme_mod( 'custom_logo' );
    $html = sprintf( '%1$s',
        wp_get_attachment_image( $custom_logo_id, 'full', false, array(
                'class'    => 'custom-logo',
            ) 
        )
    );
    return $html;    
}

RajeebTheGreat

Startups Enthusiast. Loves to code (PHP, JS). Occasional Blogger, wannabe Entrepreneur & Amateur Philosopher

Leave a Reply

Close Menu