# Astra: Hide the Featured Image on Pages

> Stops the Astra theme from showing the featured image at the top of pages, while it is still used for social sharing and page lists.

- Type: PHP
- Runs: Frontend only
- Category: [Page Builders & Themes](https://wpide.com/library/category/page-builders/)
- Tags: astra, featured-image, pages
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/astra-hide-featured-image-on-pages/

## Code

```php
add_filter( 'astra_featured_image_enabled', function ( $enabled ) {
    if ( defined( 'ASTRA_THEME_VERSION' ) && is_page() ) {
        return false;
    }

    return $enabled;
} );
```

## Notes

Change is_page() to is_singular( 'post' ) to hide it on blog posts instead.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Astra: Hide the Featured Image on Pages" 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/
