WordPress codex for page Anthony 10 years ago How to get the current page slug? global $post; $slug = get_post( $post )->post_name;