How can I change this code
$posts = get_posts(array('post_type'=> 'lesson', 'post_status'=> 'publish', 'suppress_filters' => false, 'posts_per_page'=>-1));
//here you add the HTML of the dropdown you add something like
echo '<p>Select the lesson: <select name="_dappcf_i_dropdown" class="widefat" style="width:170px" >';
foreach ($posts as $post) {
echo '<option value="', $post->ID, '"'; if ($my_dropdown == $post->ID){echo ' selected="selected"';} echo '>'.$post->post_title.'</option>';
}
echo '</select>';
}
to echo the title of the selected post in page template with the URL of of SELECTED post(the title should be a link)?
Thanks in advance