What I want to achieve is, If there is feature image then show specific <div class="has-featured-image">
.
What I have tried or thought ?
I thought of using jQuery to achieve that. Like if there is specific class of feature image is present there, then show <div class='has-featured-image'>
, which logically works.
But the issue that I am facing is:
1> If admin removes the featured image, then how can I modify the same DIV with <div class="no-feature-image>"
? because the jquery I am inserting is based on DOM ready.
Other thing that I have tried
Other thing I thought of to use wordpress condition of has_post_thumbnail, but the issue is, it only work if admin refresh the page or comes to that page 1st time.
Is it possible to achieve ?
If anybody can give me start then It would be great.
Thanks in advance.