WP-Mix

A fresh mix of code snippets and tutorials

Get the Current URL in WordPress

Quick tip: get the current URL in WordPress:

global $wp;
$current_url = add_query_arg($wp->query_string, '', home_url($wp->request));

Learn more

WordPress Themes In Depth