To get the URL protocol use the following snippet.
Returns http / https
To get the URL host name use the following snippet.
To get the URL pathname of the file use the following snippet.
Get URL Hash Value
If a URL has a # target selected this snippet will return the value.
For the URL of http://www.paulund.co.uk#top.
This will return top.
Fastest WordPress Hosting With WPEngine
Stunning speed, powerful security, and best-in-class customer service. At WP Engine.
Join the weekly newsletter
Sign up for our newsletter. You'll be updated on new tutorials as they come available.
Subscribe today and get a 50% discount code to Paulund