Create an if is_page statement based on parent page

Hey ! This should work.

$current_url = home_url( $wp->request );

if (strpos($current_url,'courses') !== false)
{
    //Do Something
}
else
{
    //Do Something
}