Slideshow com Custom Post Type - function