I have a site I’m building locally and the site requires a custom webfont which is loaded and works fine locally. When I send the live link to my client. The font doesn’t load.
THis is the CSS call
src: url('http://compassu2.local/wp-content/themes/bb-theme/fonts/355C83_0_0.eot?#iefix') format('embedded-opentype'), url('http://compassu2.local/wp-content/themes/bb-theme/fonts/355C83_0_0.woff2') format('woff2'), url('http://compassu2.local/wp-content/themes/bb-theme/fonts/355C83_0_0.woff') format('woff'), url('http://compassu2.local/wp-content/themes/bb-theme/fonts/355C83_0_0.ttf') format('truetype');
Is there a work around for this?
This is the live link.
Should I duplicate the css using the live link url?
happy to help here!
So you are correct in thinking you may need to use the live link in your CSS src links.
The error is the compassu2.local domain is only available to your local machine and not accessible by the browser to connect to form the outside world.
Live link proxies all requests through to your local machines site domain, but cannot rewrite or update the hardcoded links to your local domain.
As much as adding the Live Link to your CSS will help here, it will require each time the Live Link changes and you restart it, that you need to upload the src URL with the new live link domain generated too.
You may instead be able to simply remove the absolute URL with the domain and instead just use a relative path like:
This may work, let me know how you get on with the relative link, otherwise, you may need to simply update the URL with the live link each time.
Happy New Year Chris!
Thanks for the path help. That did it.
@PaulHal no problem my friend! Glad it worked
And happy new year to you too buddy.
If there is anything else, please do let us know.
Have a great day,