Category: WordPress function post page slug

WordPress function to get post/page slug

Here’s the function. Copy it and paste it into your functions.php file: Once done, simply call the function within the loop to get the post or page slug. Thanks to Maidul for the function!