Get the current page URL (including pagination)
In addition to Rajeev Vyas’s answer, you don’t need to pass any non-empty parameters to add_query_arg(). The following has always worked well for me: // relative current URI: $current_rel_uri = add_query_arg( NULL, NULL ); // absolute current URI (on single site): $current_uri = home_url( add_query_arg( NULL, NULL ) ); The function falls back on $_SERVER[ … Read more