added condition to filter posts of type photo