Last active
April 15, 2017 02:57
-
-
Save MrJSdev/7a7b8b15289ef0c602592f792bf6ea84 to your computer and use it in GitHub Desktop.
This another way of displaying page slug in WordPress. The full guide is available at http://extracatchy.net/retrieve-the-slug-of-current-page-wordpress/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // get page slug name | |
| $slug = get_post_field( 'post_name'); | |
| // echo the $slug | |
| echo $slug; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment