When I'm using wp_get_attachment_url( $name->name )
it uses the full URL (ie. http://domain.com/files/file.zip
). It seems that this doesn't work for my use, as I only want to get the URL without the domain (just the subpath).
It works just fine if I manually enter files/file.zip
in the code. How can I format the URL from wp_get_attachment to get the URL in this format, without the domain name?