Last active
May 24, 2016 00:59
-
-
Save JamieWritesCode/9ca00c09b44a0e3242ed2daba9e9fa1d to your computer and use it in GitHub Desktop.
Wordpress snippet to return current page URL from any template.
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
global $wp; | |
$current_url = home_url(add_query_arg(array(),$wp->request)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment