fixing indentations and replacede the get_id() for get_data() to retrieve the id and title from URL.