Home › Forums › Calendar Products › Events Calendar PRO › Organisers Mailto Link
- This topic has 5 replies, 4 voices, and was last updated 9 years, 7 months ago by
Hanna.
-
AuthorPosts
-
August 29, 2016 at 3:15 am #1156997
Hanna
ParticipantHI Guys,
I am not sure if this has been asked before?
I was wondering if it was possible to customise the Mailto: Link in the Organisers Details section? At the moment when someone clicks on the mailto link to contact the organiser, the subject field in the email is blank.
I would like to change this so the subject field readers: RSVP:
Example: “mailto:[email protected]?subject=RSVP”
Is this possible and how would I do this?
I look forward to hearing from you soon.
August 29, 2016 at 4:22 pm #1157343Andras
KeymasterHello Hanna,
That is a very good question you have! Let me help you with that one.
It is possible to do that with some customization.
Copy this file:
wp-content\plugins\the-events-calendar\src\views\modules\meta\organizer.phpto:
wp-content\themes\{your-theme}\tribe-events\modules\meta\organizer.php
and open it for editing.Line 56 should be this:
<?php echo esc_html( $email ); ?>Change that to this:
?subject=RSVP"><?php echo esc_html( $email ); ?>Please note that this will make a clickable and robot-readable link from the organizer email address, which might result in increased spam to that email account. Using an email address obfuscating plugin is advised. (Here is one, though I didn’t test it with this solution: https://wordpress.org/plugins/obfuscate-email/)
Let me know if this helps.
Cheers,
AndrasAugust 31, 2016 at 4:55 am #1158031Hanna
ParticipantThank you for getting back to me.
I am currently using a Child Theme and was wondering if I would need to copy and paste the edited code into the parent theme? If so, I have used the FTP client ‘CyberDuck’ to locate the file and noticed the Child and Parent theme does not have the wp-content\themes\{your-theme}\tribe-events\modules\meta\organizer.php for some strange reason?
Is it possible to create a plugin using the code and upload the script to wordpress directly via the dashboard?
September 1, 2016 at 2:33 pm #1159017Andras
KeymasterHey Hanna,
I guess it could be done via a plugin, but would take much more unneeded work.
It is best doing it as a template override in your child theme’s directory – sorry for not specifying that earlier.
So this is what you will need to do:
- Get a copy of the wp-content\plugins\the-events-calendar\src\views\modules\meta\organizer.php file
- Copy it to wp-content\themes\{your-child-theme}\tribe-events\modules\meta\organizer.php (If the directories don’t exist then you will need to create them.)
- Edit the copied file and do the changes outlined above / below (corrected code)
I realized that the code I pasted in above had errors, so let me put it here again properly:
Looking forward to hear the results!
Cheers,
AndrasSeptember 23, 2016 at 9:35 am #1167995Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Organisers Mailto Link’ is closed to new replies.
