Title: Code does not disable featured image
Last modified: December 8, 2020

---

# Code does not disable featured image

 *  Resolved [合 Николай Сидорюк](https://wordpress.org/support/users/infonik/)
 * (@infonik)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/code-does-not-disable-featured-image/)
 * Code does not disable featured image
 *     ```
       add_filter('cybocfi_hide_by_default', '__return_true');
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcode-does-not-disable-featured-image%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [cyrillbolliger](https://wordpress.org/support/users/cyrillbolliger/)
 * (@cyrillbolliger)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/code-does-not-disable-featured-image/#post-13759553)
 * Hi 合 Николай Сидорюк
 * That is the intended behavior. This filter only pre-selects the checkbox that
   hides the featured image on **new** posts and pages. Existing posts and pages
   won’t be changed.
 * See [this thread](https://wordpress.org/support/topic/bulk-editing-posts-with-your-plugin/)
   on how to hide all featured images on existing posts.
 * Cheers,
    Cyrill
 *  Thread Starter [合 Николай Сидорюк](https://wordpress.org/support/users/infonik/)
 * (@infonik)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/code-does-not-disable-featured-image/#post-13759850)
 * here is the post [https://qazlive.kz/glavnye-kollaboraczii-cyberpunk-2077-s-porsche-adidas-nvidia-i-dazhe-yumoney/](https://qazlive.kz/glavnye-kollaboraczii-cyberpunk-2077-s-porsche-adidas-nvidia-i-dazhe-yumoney/)
   published after adding the code.
 * here is a screenshot of [https://i.imgur.com/IsAoGgo.png](https://i.imgur.com/IsAoGgo.png)
   here you can see the post publication time, the code was added earlier.
 *  Plugin Author [cyrillbolliger](https://wordpress.org/support/users/cyrillbolliger/)
 * (@cyrillbolliger)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/code-does-not-disable-featured-image/#post-13759937)
 * I can’t see the plugin (featured image metabox) on the screenshot, so it’s hard
   to judge.
 * But it is possible, that the plugin is not compatible with your theme (c.f. [important notice](https://wordpress.org/plugins/conditionally-display-featured-image-on-singular-pages/))
 *  Thread Starter [合 Николай Сидорюк](https://wordpress.org/support/users/infonik/)
 * (@infonik)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/code-does-not-disable-featured-image/#post-13759990)
 * for new posts created in the site admin area, this code disables the featured
   image display, but for posts that are loaded from other sites by auto-posting–
   no
 *  Thread Starter [合 Николай Сидорюк](https://wordpress.org/support/users/infonik/)
 * (@infonik)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/code-does-not-disable-featured-image/#post-13760149)
 * i solved the issue with CSS…
 *  Plugin Author [cyrillbolliger](https://wordpress.org/support/users/cyrillbolliger/)
 * (@cyrillbolliger)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/code-does-not-disable-featured-image/#post-13760199)
 * Ah, now I get your issue.
 * Give me some time to think about a good solution on how this could be implemented
   in a future version of the plugin.
 *  Plugin Author [cyrillbolliger](https://wordpress.org/support/users/cyrillbolliger/)
 * (@cyrillbolliger)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/code-does-not-disable-featured-image/#post-13765976)
 * Ah, great you found a solution.
 *  [kshjelm](https://wordpress.org/support/users/kshjelm/)
 * (@kshjelm)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/code-does-not-disable-featured-image/#post-13777612)
 * I have the same problem.
    Tried diferent CSS without result. Do you have one 
   that works?
 *  Plugin Author [cyrillbolliger](https://wordpress.org/support/users/cyrillbolliger/)
 * (@cyrillbolliger)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/code-does-not-disable-featured-image/#post-13780391)
 * Hi [@kshjelm](https://wordpress.org/support/users/kshjelm/) and [@infonik](https://wordpress.org/support/users/infonik/)
 * I’ve just released a new version that should address your issues. If the `cybocfi_hide_by_default`
   filter is used and returns `true`, the featured image is now also hidden for 
   programmatically added posts.
 * Please let me know, if the update to version 2.5.0 did not resolve your issue.
 * Have an excellent weekend!
    Cyrill
 *  [kshjelm](https://wordpress.org/support/users/kshjelm/)
 * (@kshjelm)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/code-does-not-disable-featured-image/#post-13780847)
 * The filter hide the bigg mainimage in post, but show the small thumnail.
    Like
   this: [https://auroraskok.se/2020/12/12/post-with-default-filter/](https://auroraskok.se/2020/12/12/post-with-default-filter/)
 * When filter of its shows featured image and the big one: [https://auroraskok.se/2020/12/12/post-with-filter-false/](https://auroraskok.se/2020/12/12/post-with-filter-false/)
 * It should be only the big one. Maby some css can fix that, but I not now hos 
   to write that.
    -  This reply was modified 5 years, 5 months ago by [kshjelm](https://wordpress.org/support/users/kshjelm/).
    -  This reply was modified 5 years, 5 months ago by [kshjelm](https://wordpress.org/support/users/kshjelm/).
 *  Plugin Author [cyrillbolliger](https://wordpress.org/support/users/cyrillbolliger/)
 * (@cyrillbolliger)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/code-does-not-disable-featured-image/#post-13780966)
 * Hi [@kshjelm](https://wordpress.org/support/users/kshjelm/)
 * It seems like your problem is different to the one described by infonik.
 * However, if I look at your two demo pages, I can’t provide you an easy solution.
   The plugin works as intended (it removes the featured image, which is the big
   one). The thumbnail is added somehow other than by the featured image mechanism.
   Unfortunately it does not add an id or class, so there is no safe and easy CSS
   hack you could apply.
 * I do recommend you to contact the author of your theme.
 * Ha en bra helg,
    Cyrill
    -  This reply was modified 5 years, 5 months ago by [cyrillbolliger](https://wordpress.org/support/users/cyrillbolliger/).

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Code does not disable featured image’ is closed to new replies.

 * ![](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](https://wordpress.org/plugins/conditionally-display-featured-image-on-singular-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/conditionally-display-featured-image-on-singular-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/conditionally-display-featured-image-on-singular-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/conditionally-display-featured-image-on-singular-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/conditionally-display-featured-image-on-singular-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/conditionally-display-featured-image-on-singular-pages/reviews/)

 * 11 replies
 * 3 participants
 * Last reply from: [cyrillbolliger](https://wordpress.org/support/users/cyrillbolliger/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/code-does-not-disable-featured-image/#post-13780966)
 * Status: resolved