Title: Conditionally display featured image on singular posts and pages
Author: cyrillbolliger
Published: <strong>2016-11-17</strong>
Last modified: 2026-05-03

---

Szukaj wtyczek

![](https://ps.w.org/conditionally-display-featured-image-on-singular-pages/assets/
banner-772x250.jpg?rev=2179257)

![](https://ps.w.org/conditionally-display-featured-image-on-singular-pages/assets/
icon.svg?rev=2346522)

# Conditionally display featured image on singular posts and pages

 Autor: [cyrillbolliger](https://profiles.wordpress.org/cyrillbolliger/)

[Pobierz](https://downloads.wordpress.org/plugin/conditionally-display-featured-image-on-singular-pages.3.4.0.zip)

[Podgląd na żywo](https://pl.wordpress.org/plugins/conditionally-display-featured-image-on-singular-pages/?preview=1)

 * [Szczegóły](https://pl.wordpress.org/plugins/conditionally-display-featured-image-on-singular-pages/#description)
 * [Recenzje](https://pl.wordpress.org/plugins/conditionally-display-featured-image-on-singular-pages/#reviews)
 *  [Instalacja](https://pl.wordpress.org/plugins/conditionally-display-featured-image-on-singular-pages/#installation)
 * [Rozwój](https://pl.wordpress.org/plugins/conditionally-display-featured-image-on-singular-pages/#developers)

 [Wsparcie](https://wordpress.org/support/plugin/conditionally-display-featured-image-on-singular-pages/)

## Opis

Easily control the visibility of the featured image on singular posts and pages–
while keeping it visible in archive pages, query loops, and other list views. This
plugin provides a simple checkbox option within the post editor, allowing you to
enable or disable the display of the featured image on individual posts and pages.

#### Key Features

 * Show or hide the featured image on singular pages and posts.
 * Seamlessly integrates with the WordPress post editor.
 * Simple checkbox toggle—no technical knowledge needed.
 * AI ready.
 * Compatible with most themes.
 * Supports WooCommerce product pages.
 * Lightweight and optimized for performance.
 * 100% free—no ads, no upsells, no premium versions!

Perfect for bloggers, content creators, and developers who want precise control 
over the visibility of featured images on a per-post basis.

#### Important Notice

If your theme uses a custom method to load the featured image (such as the Twenty
Seventeen theme), this plugin may not work. To ensure compatibility, use standard
WordPress functions like `get_the_post_thumbnail()`, `wp_get_attachment_image()`,
or the [Post Featured Image](https://wordpress.org/support/article/post-featured-image-block/)
block.

Additionally, by default, this plugin only hides the featured image when it is loaded
inside the loop. If your theme loads it outside the loop check out the first FAQ
entry for a solution.

## Zrzuty ekranu

[⌊Backend (Block Editor)⌉⌊Backend (Block Editor)⌉[

Backend (Block Editor)

[⌊Frontend (Front Page / Post List / Query Loop Block / Archive View)⌉⌊Frontend (
Front Page / Post List / Query Loop Block / Archive View)⌉[

Frontend (Front Page / Post List / Query Loop Block / Archive View)

[⌊Frontend (Post / Page / Singular View)⌉⌊Frontend (Post / Page / Singular View)⌉[

Frontend (Post / Page / Singular View)

[⌊Backend (Classic Editor)⌉⌊Backend (Classic Editor)⌉[

Backend (Classic Editor)

[⌊Backend (WooCommerce Product)⌉⌊Backend (WooCommerce Product)⌉[

Backend (WooCommerce Product)

## Instalacja

 1. Upload the plugin files to the `/wp-content/plugins/conditional-featured-image`
    directory, or install the plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the `Plugins` screen in WordPress

## Najczęściej zadawane pytania

### The plugin doesn’t work with my theme. What can I do?

Some themes load featured images in custom ways, which may cause compatibility issues.
The two most common reasons are:

1) The theme loads the featured image before the loop (e.g., in the header).
 2)
The theme manually calls the featured image using custom functions.

**Solution for case 1**

If your theme loads the featured image before the loop, you can modify the plugin’s
behavior by adding the following snippet to your `functions.php` file:

    ```
    function cybocfi_set_startup_hook() {
        return 'get_header';
    }

    add_filter( 'cybocfi_startup_hook', 'cybocfi_set_startup_hook' );
    add_filter( 'cybocfi_only_hide_in_the_loop', '__return_false' );
    ```

_Note:_ This may hide the featured image from other plugins that rely on it, such
as SEO plugins or the 'latest posts’ plugin.

**Solution for case 2**

If your theme uses custom functions to display featured images, try the following
options:

 * Ask the theme developer to use standard WordPress functions like `wp_get_attachment_image()`,`
   get_the_post_thumbnail()` or `the_post_thumbnail()`.
 * Create a child theme and load the featured image with one of the functions above.

### Is this plugin GDPR compliant?

Yes! This plugin does not collect, process, or store any personal information, making
it fully GDPR-compliant.

### Can I hide featured images by default?

Yes. Add the following code to your `functions.php` file to hide featured images
by default:

    ```
    add_filter('cybocfi_hide_by_default', '__return_true');
    ```

This will automatically check the „Hide Featured Image” option for all **new** posts
and pages. Existing content remains unchanged.

For different default behaviors based on the post type, use:

    ```
    function cybocfi_set_default_hiding_state( $default, $post_type ) {
        if ( 'post' === $post_type ) {
            $default = true; // Hide featured images on posts by default
        } else if ( 'page' === $post_type ) {
            $default = false; // Show featured images on pages by default
        }
        return $default;
    }
    add_filter( 'cybocfi_hide_by_default', 'cybocfi_set_default_hiding_state', 10, 2 );
    ```

### Can I limit this plugin to posts (and exclude other post types)?

Yes. By default, the plugin works on all post types that support featured images.
To restrict it to posts only, add the following snippet to your `functions.php`:

    ```
    function cybocfi_limit_to_posts( $enabled, $post_type ) {
        if ( 'post' === $post_type ) {
            return $enabled;
        }

        return false;
    }
    add_filter( 'cybocfi_enabled_for_post_type', 'cybocfi_limit_to_posts', 10, 2 );
    ```

If you want it to work for both posts and pages but disable it for other post types:

    ```
    function cybocfi_limit_to_posts_and_pages( $enabled, $post_type ) {
        $allowed_post_types = array( 'post', 'page' ); // add any post type you want to use the plugin with
        return in_array( $post_type, $allowed_post_types );
    }
    add_filter( 'cybocfi_enabled_for_post_type', 'cybocfi_limit_to_posts_and_pages', 10, 2 );
    ```

### WooCommerce: How does the plugin handle product images?

If the featured image is hidden for a WooCommerce product, it will still appear 
as a thumbnail in the cart, checkout, and product lists. However, it will not be
displayed in the single product view. If a product gallery is available, all gallery
images will be shown as usual, except for the hidden featured image.

### WooCommerce: Can I remove empty space left by the hidden image?

Yes. The plugin applies CSS adjustments automatically for standard themes. If needed,
customize it with this snippet:

    ```
    function cybocfi_woocommerce_styles( $css ) {
        return '.wp-block-woocommerce-product-image-gallery {display: none;}';
    }
    add_filter( 'cybocfi_woocommerce_style_overrides', 'cybocfi_woocommerce_styles' );
    ```

These styles apply only when the featured image is hidden in WooCommerce product
pages.

### Can I translate this plugin into my language?

Absolutely! You can [contribute a translation](https://translate.wordpress.org/projects/wp-plugins/conditionally-display-featured-image-on-singular-pages/)
here. Keep in mind that translations need community approval before they go live.

### How can I change the text of the checkbox?

You can customize the checkbox label using this filter in your `functions.php` file:

    ```
    function cybocfi_set_featured_image_label( $label ) {
        return 'Hide featured image in post'; // change this text
    }
    add_filter( 'cibocfi_checkbox_label', 'cybocfi_set_featured_image_label' );
    ```

### I can’t save posts in WordPress 5.7.0

A WordPress core bug ([#52787](https://core.trac.wordpress.org/ticket/52787)) may
cause this issue when another plugin uses post meta values in a specific way. If
you see the error „Updating failed. Could not delete meta value from database.”,
try:

 * Downgrading to WordPress 5.6.2.
 * Upgrading to WordPress 5.7.1 or later.

### I’m getting a deprecation notice. What should I do?

The `cybocfi_post_type` filter has been replaced with `cybocfi_enabled_for_post_type`.
To update your code:

1) Change the filter hook from `cybocfi_post_type` to `cybocfi_enabled_for_post_type`.

2) Swap the filter functions arguments. `$enabled` is now the first argument `$post_type`
the second.

In case you’ve only used one argument (`$post_type`), you must not only adapt the
function signature, but also add the priority and number of arguments to your `add_filter()`
function call.

Here’s an example:

    ```
    // BEFORE UPDATE: Using the deprecated filter
    function cybocfi_limit_to_posts( $post_type, $enabled ) {
        if ( 'post' === $post_type ) {
            return $enabled;
        }

        return false;
    }
    add_filter( 'cybocfi_post_type', 'cybocfi_limit_to_posts', 10, 2 );

    // AFTER UPDATE: Using the new filter
    function cybocfi_limit_to_posts( $enabled, $post_type ) {
        if ( 'post' === $post_type ) {
            return $enabled;
        }

        return false;
    }
    add_filter( 'cybocfi_enabled_for_post_type', 'cybocfi_limit_to_posts', 10, 2 );
    ```

## Recenzje

![](https://secure.gravatar.com/avatar/61031f8a50a38ff1388bc936c3fe3ad04c7396a19b1f87d63f03f9bed7d1c7c9?
s=60&d=retro&r=g)

### 󠀁[Very Usefull](https://wordpress.org/support/topic/very-usefull-564/)󠁿

 [Sofian J. Anom](https://profiles.wordpress.org/sofianjanom/) 2026-01-05 1 odpowiedź

Work perfectly on my website.

![](https://secure.gravatar.com/avatar/690c6e8751ce99c9897ad652784ffab2afd4d32cc9b9cdf7987d74412fc8c870?
s=60&d=retro&r=g)

### 󠀁[Totally perfect one of a kind plugin that serves a true niche purpose](https://wordpress.org/support/topic/totally-perfect-one-of-a-kind-plugin-that-serves-a-true-niche-purpose/)󠁿

 [icecreamjelly](https://profiles.wordpress.org/icecreamjelly/) 2024-11-10 1 odpowiedź

Thank you so much for creating this plugin. I have been using it for a couple of
months and it works superbly. I didn't think such a plugin would exist since it 
serves such a niche purpose and was so pleased to have found it and that it just
works. It works so simply (just a check box, basically plug and play) and is perfect
for my site. For those of you who want to know applications for how this plugin 
could be used: I have another plugin that displays content on a page using a shortcode,
that content already contains an image but that image does not show up in lists 
of recent posts such as on the home page, so I have to add that image as a featured
image in the post that contains the short code. Without this plugin, the page will
show two instances of the same image at the same time and would not look so good.
This plugin lets me add a featured image to a post, display it anywhere that lists
recent posts for visual purposes, but then hide it on the actual page itself so 
only the image from the shortcode shows. Perfect.

![](https://secure.gravatar.com/avatar/e202ae186d5c79680b97e147d49ce9be9d2403b162e90fc4be569c67900d3d3d?
s=60&d=retro&r=g)

### 󠀁[Worked when CSS didn’t](https://wordpress.org/support/topic/worked-when-css-didnt/)󠁿

 [MBV](https://profiles.wordpress.org/mbv/) 2024-08-20 1 odpowiedź

For some reason, CSS to hide featured image wasn't working, this plugin did the 
trick… Thanks so much!

![](https://secure.gravatar.com/avatar/1e9e69c89d39ca4336420da9abde7d043110a0da5d777ba338126245a918ff6e?
s=60&d=retro&r=g)

### 󠀁[Works fine on WordPress 6.6](https://wordpress.org/support/topic/works-fine-on-wordpress-6-6/)󠁿

 [stephunique](https://profiles.wordpress.org/stephunique/) 2024-07-23 1 odpowiedź

Plug and play, straight forward, just works. Works on Wordpress 6.6, maybe it doesn't
need to be updated that often. Thank you for such a simple fix to a niche request!

![](https://secure.gravatar.com/avatar/d8f1e4e8b806e47f7a63a010f232cd99036e21d56a9211406c62999f2b18aea1?
s=60&d=retro&r=g)

### 󠀁[So relieved](https://wordpress.org/support/topic/so-relieved/)󠁿

 [kjc1900](https://profiles.wordpress.org/kjc1900/) 2024-04-06

Finally. A plug-in that just works. Thank you for making my headache go away.

![](https://secure.gravatar.com/avatar/f2bb49b807e9b3585257a7179e11ed7e82830807e8210e73556f09710ea58521?
s=60&d=retro&r=g)

### 󠀁[Не везде работает](https://wordpress.org/support/topic/%d0%bd%d0%b5-%d0%b2%d0%b5%d0%b7%d0%b4%d0%b5-%d1%80%d0%b0%d0%b1%d0%be%d1%82%d0%b0%d0%b5%d1%82/)󠁿

 [Andrew P. Popov](https://profiles.wordpress.org/papex/) 2024-01-26

В некоторых темах просто не работает совсем. Галочку ставишь — эффекта нуль.

 [ Przeczytaj 38 recenzji ](https://wordpress.org/support/plugin/conditionally-display-featured-image-on-singular-pages/reviews/)

## Kontrybutorzy i deweloperzy

„Conditionally display featured image on singular posts and pages” jest oprogramowaniem
open source. Poniższe osoby miały wkład w rozwój wtyczki.

Zaangażowani

 *   [ cyrillbolliger ](https://profiles.wordpress.org/cyrillbolliger/)

Wtyczka „Conditionally display featured image on singular posts and pages” została
przetłumaczona na 4 języki. Podziękuj [tłumaczom](https://translate.wordpress.org/projects/wp-plugins/conditionally-display-featured-image-on-singular-pages/contributors)
za ich wkład.

[Przetłumacz wtyczkę “Conditionally display featured image on singular posts and pages” na swój język.](https://translate.wordpress.org/projects/wp-plugins/conditionally-display-featured-image-on-singular-pages)

### Interesuje cię rozwój wtyczki?

[Przeglądaj kod](https://plugins.trac.wordpress.org/browser/conditionally-display-featured-image-on-singular-pages/),
sprawdź [repozytorium SVN](https://plugins.svn.wordpress.org/conditionally-display-featured-image-on-singular-pages/)
lub czytaj [dziennik rozwoju](https://plugins.trac.wordpress.org/log/conditionally-display-featured-image-on-singular-pages/)
przez [RSS](https://plugins.trac.wordpress.org/log/conditionally-display-featured-image-on-singular-pages/?limit=100&mode=stop_on_copy&format=rss).

## Rejestr zmian

#### 3.4.0

 * Added WordPress Abilities API support
 * Updated dependencies

#### 3.3.2

 * Compatibility up to WordPress 6.9
 * Updated dependencies

#### 3.3.1

 * Fixed violation of the WordPress coding standards

#### 3.3.0

 * Added support for WooCommerce
 * Fixed `bottom margin` deprecation notice
 * Updated dependencies

#### 3.2.0

 * Requires at least WordPress 6.6
 * Compatibility up to WordPress 6.7
 * Fixed `withState` deprecation notice
 * Updated dependencies

#### 3.1.1

 * Compatibility with Gutenberg 16.6.0
 * Updated dependencies

#### 3.0.1

 * Fixes fatal error for users that customized the startup hook so the query could
   not be set.

#### 3.0.0

 * Improved compatibility with the block editor
 * Updated dependencies

We’ve tested the release thoroughly – however depending on the theme and plugin 
you use, this release might be breaking in some exceptional cases.

#### 2.14.0

 * The featured image is now displayed inside the query block
 * Small performance and readability improvement
 * Updated dependencies

#### 2.13.0

 * Improved compatibility for block themes
 * The `cybocfi_enabled_for_post_type` filter now also applies directly to the output
   in the frontend
 * Refactored plugin architecture from single file to single class per file
 * Updated dependencies

#### 2.12.0

 * Don’t hide featured image from oEmbed requests.
 * Updated dependencies

#### 2.11.0

 * Show deprecation notice if `cybocfi_post_type` filter is used. Props to @swissspidy
   for bringing `apply_filters_deprecated()` to my attention.

#### 2.10.0

 * Deprecated `cybocfi_post_type` filter in favor of the new `cybocfi_enabled_for_post_type`
   filter. Props to @swissspidy for highlighting the issues with `cybocfi_post_type`.
 * Updated dependencies

#### 2.9.0

 * Added filter to bypass the in_the_loop() test so the plugin can be made compatible
   with themes that load the featured image outside the main loop.

#### 2.8.2

 * Fixed bug that was hiding the featured image in the latest posts widget. Props
   to @molcsa for pointing this out.
 * Updated dependencies

#### 2.8.1

 * Extended FAQ
 * Updated dependencies
 * Tested up to WordPress 5.8.2

#### 2.8.0

 * Added hook for early initialization
 * Extended FAQ
 * Small refactorings
 * Updated dependencies

#### 2.7.1

 * Tested up to WordPress 5.7
 * Updated dependencies

#### 2.7.0

 * Added support for the Custom Post Type UI plugin
 * Updated dependencies

#### 2.6.0

 * Added support for the twentynineteen theme

#### 2.5.1

 * Fix: Do not remove the featured image in queries executed after the main query
 * Updated dependencies

#### 2.5.0

 * Respect the `cybocfi_hide_by_default` filter for programmatically added posts
 * Small refactorings
 * Tested up to WordPress 5.6.0
 * Updated dependencies

#### 2.4.0

 * Added filter to hide featured images by default
 * Tested up to WordPress 5.5.1
 * Extended FAQ
 * Updated dependencies

#### 2.3.1

 * Tested up to WordPress 5.5 (RC1)
 * Extended FAQ
 * Updated dependencies

#### 2.3.0

 * Allow to enable/disable the plugin by post type

#### 2.2.0

 * Allow filtering the featured image checkbox label
 * Update readme
 * Update dependencies

#### 2.1.2

 * Exclude none essential data from SVN

#### 2.1.1

 * Update dependencies

#### 2.1.0

 * Add support for Yoast SEO (don’t filter image for the social header data)

#### 2.0.0

 * Add support for the block editor (Gutenberg)
 * Tested up to WordPress 5.2.2

#### 1.4.0

 * Makes sure, we do only modify the main post
 * Tested up to WordPress 5.0.0

#### 1.3.0

 * Make it more robust so it will also work with [Elementor](https://elementor.com/)
 * Tested up to WordPress 4.9.6

#### 1.2.2

 * Tested up to WordPress 4.7.3
 * Tested up to WordPress 4.8.0
 * Tested up to WordPress 4.9.0

#### 1.2.1

 * Tested up to WordPress 4.7.2

#### 1.2.0

 * Get ready for language packs (set text domain equal to the name of the plugins
   folder, remove load_plugin_textdomain)

#### 1.1.3

 * Tested up to WordPress 4.7.0
 * Removed language folder. Languages are now loaded from wordpress.org

#### 1.1.2

 * Improve plugin title
 * Improve checkbox string
 * Improve documentation
 * Updated stable tag

#### 1.1.1

 * Updated stable tag

#### 1.1

 * Extended functionality to pages

#### 1.0

 * Initial public release

## Meta

 *  Wersja **3.4.0**
 *  Ostatnia aktualizacja **5 miesięcy temu**
 *  Włączone instalacje **30,000+**
 *  Wersja WordPressa ** 6.7 lub nowszej **
 *  Testowano do **6.9.10**
 *  Wersja PHP ** 5.6 lub nowszej **
 *  Języki
 * [English (US)](https://wordpress.org/plugins/conditionally-display-featured-image-on-singular-pages/),
   [French (France)](https://fr.wordpress.org/plugins/conditionally-display-featured-image-on-singular-pages/),
   [German](https://de.wordpress.org/plugins/conditionally-display-featured-image-on-singular-pages/),
   [Korean](https://ko.wordpress.org/plugins/conditionally-display-featured-image-on-singular-pages/),
   i [Swedish](https://sv.wordpress.org/plugins/conditionally-display-featured-image-on-singular-pages/).
 *  [Przetłumacz na swój język](https://translate.wordpress.org/projects/wp-plugins/conditionally-display-featured-image-on-singular-pages)
 * Tagi
 * [featured](https://pl.wordpress.org/plugins/tags/featured/)[featured image](https://pl.wordpress.org/plugins/tags/featured-image/)
   [featuredimage](https://pl.wordpress.org/plugins/tags/featuredimage/)[image](https://pl.wordpress.org/plugins/tags/image/)
   [thumbnail](https://pl.wordpress.org/plugins/tags/thumbnail/)
 *  [Widok zaawansowany](https://pl.wordpress.org/plugins/conditionally-display-featured-image-on-singular-pages/advanced/)

## Oceny

 4.8 na 5 gwiazdek.

 *  [  34 recenzje 5-gwiazdkowe     ](https://wordpress.org/support/plugin/conditionally-display-featured-image-on-singular-pages/reviews/?filter=5)
 *  [  2 recenzje 4-gwiazdkowe     ](https://wordpress.org/support/plugin/conditionally-display-featured-image-on-singular-pages/reviews/?filter=4)
 *  [  1 recenzja 3-gwiazdkowa     ](https://wordpress.org/support/plugin/conditionally-display-featured-image-on-singular-pages/reviews/?filter=3)
 *  [  1 recenzja 2-gwiazdkowa     ](https://wordpress.org/support/plugin/conditionally-display-featured-image-on-singular-pages/reviews/?filter=2)
 *  [  0 recenzji 1-gwiazdkowych     ](https://wordpress.org/support/plugin/conditionally-display-featured-image-on-singular-pages/reviews/?filter=1)

[Twoja opinia](https://wordpress.org/support/plugin/conditionally-display-featured-image-on-singular-pages/reviews/#new-post)

[Zobacz wszystkierecenzje.](https://wordpress.org/support/plugin/conditionally-display-featured-image-on-singular-pages/reviews/)

## Zaangażowani

 *   [ cyrillbolliger ](https://profiles.wordpress.org/cyrillbolliger/)

## Wsparcie

Masz coś do dodania? Potrzebujesz pomocy?

 [Zobacz forum wsparcia](https://wordpress.org/support/plugin/conditionally-display-featured-image-on-singular-pages/)