I need to get the title from my custom post but its showing from my default post. here is my code. please help.
It's not inside any custom loop, so the_title(); function won't work here for your custom post. It will go find the post from main query. Try echo get_the_title($slide);.