Add is_single() condition to make sure plugin only runs on single view of a post