I am trying to implement auto set featured image from my post content and if there is no image in the post content then set a default featured image automatically..
I have tried different code from different source but nothing seems to be working. My post content image is set from other source and these are not hosted in my site wp media library. Could this be a problem ?
I had one code that set featured image once the post is saved and these images was in the Wp library.. But my images are from other third party soruce and set it like this way below
<img src="google.com/j.jpg" />
or like that.. These images are not hosted in my wp media library.
You will have a clear Idea if you see this
So finally what I want is that set a featured image automatically from post content for new created posts and for old posts as well these are already there.. If there is no image in the Post content then just simply set a default image which can be static source..
Thanks in Advance