To get the post or page slug within your loop
global $post;
$slug = $post->post_name;
In this example we can get get the post or page slug with the ID of 7.
$slug = get_post_field( 'post_name', 7 );
Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.