Organisers Mailto Link

Home Forums Calendar Products Events Calendar PRO Organisers Mailto Link

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1156997
    Hanna
    Participant

    HI 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.

    #1157343
    Andras
    Keymaster

    Hello 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.php

    to:
    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,
    Andras

    #1158031
    Hanna
    Participant

    Thank 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?

    #1159017
    Andras
    Keymaster

    Hey 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:

    1. Get a copy of the wp-content\plugins\the-events-calendar\src\views\modules\meta\organizer.php file
    2. 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.)
    3. 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:

    ?subject=RSVP">

    Looking forward to hear the results!

    Cheers,
    Andras

    #1167995
    Support Droid
    Keymaster

    Hey 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

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Organisers Mailto Link’ is closed to new replies.