Created
September 15, 2014 22:45
-
-
Save 9ete/137e5b51e201968034f8 to your computer and use it in GitHub Desktop.
WordPress Return Pretty Permalink Slug
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 | |
echo $tokens[sizeof(explode('/', 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']))-2]; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment