Mailto link adding site URL to link and returning 404

Highlighted
New Member
4 0 0

Hello,

I'm trying to add a clickable mailto link within a line of text found in my customers/account.liquid template.

<div id="admin_header">
  <p align="center">VERY IMPORTANT: For new wholesale accounts, please email <a href=“mailto:someone@example.com”>link text</a> and place "activate account" in the subject line.</p>

For some reason my sites URL is added to the link and returns a 404 Page Not Found.

Can anyone help?

Thanks,

Dave

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
523 1 102

Hey, David!

My name is Alex, I'm a guru here at Shopify!

After some testing, I think this is a syntax issue!  I tried inserting your code into my own theme and got the same result at first - after some testing and having it spontaneously start working properly, it looks like the problem is those quotation marks.  The kind you've entered here appears to be interpreted as text, rather than as code; that being the case, the url gets added as the system thinks that it's pointing at an internal address.  If you need to do this again in the future, I'd recommend typing that out in the code rather than in a text editor to make sure that it's the right format!  For now, if you replace

“mailto:someone@example.com

with

"mailto:someone@example.com"

That should start working for you!

Hope that's helped!  Please feel free to give us a call or start a live chat at any time, we're open 24/7 for your convenience and always happy to assist!

Cheers,

Alex | Shopify Guru

Highlighted
New Member
4 0 0

THANK YOU Alex!! Worked like a charm!!

0 Likes
Highlighted
New Member
6 0 0

Hi! I'm having a similar issue where I'm trying to add a mailto: under Search No Result 

This is what I've inputted:

Can't find what you're looking for? Contact us at <a href="mailto:sales@partopiamedical.com">Link text</a> or call us at (833) 778-6742 and we would be more than happy to help! 

But it is not making a clickable email and is just showing the code on the no result page. 

Thanks in advance!

0 Likes