fixing posts loop so images are linked