Get Page Name Wp

$slug = basename(get_permalink());
//or
$wp_query->queried_object->post_name

Leave a Comment