current page
global $wp; //get url without parameters $current_url = home_url(add_query_arg(array(),$wp->request)); //get url with parameters $current_url = home_url() . $_SERVER['REQUEST_URI'];