-
markhem
I’m the Query Loop block to create an archive template for a custom post type. I’ve done this successfully before, but I’ve never added a dynamic email link. All my other fields in the template work as expected. Just having problems with the dynamic email.
I have created an email field called vendor_email.
Using an H3 (EMAIL) I’ve enabled dynamic data and selected…
DATA SOURCE – Post Type
SELECT POST TYPE – Vendors
CONTENT SOURCE – Post meta
POST META FIELD – vendor_email
LINK SOURCE – Post meta
POST META FIELD – vendor_email
LINK TYPE – emailOn the page the actual email address displays, instead of the word EMAIL.
The link appears active, but it doesn’t behave like an email, doesn’t trigger like a mailto: should.
Instead it appears to be populating the email address bar with the vendor_name field, seperated by % signs.
I tried a different email address (my own for testing) and it still pulls the vendor_name.
I’ve tried changing the email field name, and the vendor field name.
I’ve tried setting it up as a link, appending mailto: to the vendor email. Also changed email type.
I’m just not getting it. Is this a known problem? Or, something I’m not doing properly.
Thanks. -
Alvind
Hi there,
The dynamic data settings are correct, except the Data Source should be Current Post since you’ve already defined the Post Type in the Query Loop block settings.
-
markhem
Thank Alvind. I changed the Data Source to Current Post, but I got the same result; the email address is exposed to the viewer, and the link doesn’t go anywhere.
-
Alvind
That’s odd. It seems like the link was encoded by something. Do you have any security plugins activated, or something similar?
If not, do you have a staging site where I could log in to take a deeper look?
-
markhem
I have Solid Security Basic, which I just deactivated to test your suspicion. I purged the cache, and tried again. Didn’t work out. I think my host has a staging site. I usually use local by flywheel, but I’ll look into the staging set up.
-
markhem
Hi Alvind – I set up a staging site. I would be most appreciative if you could have a look at the site. Url and credentials are in the private section.
-
Alvind
I’ve found the issue. It seems that you’ve added links to the wrapper container, which is causing the email link not to be clickable. The email link itself is rendered correctly.
I’ve marked the containers that you need to remove the link from in this screenshot:
https://app.screencast.com/KarTBCsP4GKE2 -
markhem
Thanks Alvind! So, it’s working now. That just leaves the email address being visible. I just want the word EMAIL to display. Instead viewers can see the actual email address.
-
Alvind
Simply select the Email block, and under Dynamic Data, leave the Content Source option unselected.
-
markhem
At last! Thanks you so much. I’ll save that block for the future.
-
Alvind
You’re welcome!
- You must be logged in to reply to this topic.