SyntaxFix
Write A Post
Hire A Developer
Questions
You can retrieve it from the post object like so:
global $post; $post->post_name;