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 to see the link]
-
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 on how to hide all featured images on existing posts.
Cheers,
Cyrillhere is the post 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 here you can see the post publication time, the code was added earlier.
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)
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
i solved the issue with CSS…
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.
Ah, great you found a solution.
I have the same problem.
Tried diferent CSS without result.
Do you have one that works?I’ve just released a new version that should address your issues. If the
cybocfi_hide_by_defaultfilter is used and returnstrue, 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!
CyrillThe filter hide the bigg mainimage in post, but show the small thumnail.
Like this: 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/
It should be only the big one. Maby some css can fix that, but I not now hos to write that.
Hi @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.
-
This reply was modified 5 years, 5 months ago by
The topic ‘Code does not disable featured image’ is closed to new replies.