# Enable Featured Images for Any Theme

> Turns on featured image (post thumbnail) support for themes that do not declare it.

- Type: PHP
- Runs: Run everywhere
- Category: [Developer](https://wpide.com/library/category/developer/)
- Tags: developer, featured-image, theme-support
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/enable-featured-images/

## Code

```php
add_action( 'after_setup_theme', function () {
    add_theme_support( 'post-thumbnails' );
}, 20 );
```

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Enable Featured Images for Any Theme" 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/
