Thanks for the reply, but i couldn't get this to work, the IF statement returned false even if there was a featured image to a post. Further googling led me to some code which returns the url and works beautifully: