1

Similair to custom-header with register_default_headers() in version 4.5 and above.

1 Answer 1

0

No, there isn't.

Given that a logo is typically unique for each site and brand, it doesn't really make much sense to offer a default logo, except as a placeholder.

If you want to have a default logo as a placeholder in your theme, then in the template you could check if a custom value is set, and if not, display your own logo:

<?php
if ( get_custom_logo() ) {
    the_custom_logo();
} else {
    printf(
        '<a href="%1$s" class="custom-logo-link" rel="home" itemprop="url"><img src="%2$s" class="custom-logo" itemprop="logo" alt="%3$s"></a>',
        esc_url( home_url( '/' ) ),
        esc_url( get_theme_file_uri( 'images/default-logo.png' ) ),
        get_bloginfo( 'name', 'display' )
    );
}
?>

The markup in this example will match the markup output of the_custom_logo(). The logo itself would be default-logo.png in the images/ directory of your theme.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.