I am making an attempt to insert a put up picture thumbnail from my php scritp. It is inserting the put up, the content material, a obtain hyperlink, and I solely must set the thumbnail picture to complete my script. That is my code however I am unable to work out why will not be working, anyhelp could be appreciated:
$url = "http://www.take a look at.com/wp-content/uploads/2015/12/".$title[$key1].".png";
$attr = array(
'src' => basename($url),
'class' => "alignleft",
'alt' => '',
'title' => trim( strip_tags( 'Emblem' ) )
);
the_post_thumbnail('thumbnail', $attr );