The following snippet will let you get WordPress page slug.

Snippet Source/Credit: Snipplr