how to get the current page url in wordpress code example Example: current url wordpress global $wp; echo home_url( $wp->request )