matthijs166
10/24/2017 - 8:43 AM

Get current url of the page

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'];