fixed featured-image function conditional logic