# Add Logo Upload to Themes That Lack It

> Adds the "Logo" option to the Customizer for older classic themes that do not support a custom logo, with flexible width and height.

- Type: PHP
- Runs: Run everywhere
- Category: [Page Builders & Themes](https://wpide.com/library/category/page-builders/)
- Tags: classic-themes, logo, customizer
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/classic-theme-custom-logo-support/

## Code

```php
add_action( 'after_setup_theme', function () {
    if ( current_theme_supports( 'custom-logo' ) ) {
        return;
    }

    add_theme_support( 'custom-logo', array(
        'height'      => 120,
        'width'       => 400,
        'flex-height' => true,
        'flex-width'  => true,
        'unlink-homepage-logo' => true,
    ) );
}, 20 );
```

## Notes

Your theme still needs to print the logo, for example with the_custom_logo() in header.php.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Add Logo Upload to Themes That Lack It" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
