$ 0 0 Put this code in your WordPress Theme’s template file to get the url of current page. global $wp; $current_url = home_url(add_query_arg(array(),$wp->request)); Link to this post!