How to set a featured image (thumbnail) with PHP?
I am proud to announce that I have found the solution thanks to @cjbj good advice. I paste the code here. I know it will help others. In addition, I used the function preg_quote to protect the path to the image. protected_path = preg_quote($filename); This code works great. // $filename should be the path to … Read more