added additional logic to show the links in the_excert function