Making the organizer’s email link live on single event pages

Home Forums Calendar Products Events Calendar PRO Making the organizer’s email link live on single event pages

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1281106
    Geralynn
    Participant

    I used the information below to alter the organizer.php code to accomplish the live email link, however, now I have an additional email label (duplicating the email address) above the organizer header.

    Here is a sample page: https://aardvarkcs.com/tnt/event/binge-eating-group/2017-05-17/

    Actually, I would prefer the email address not to show at all and have the end user click the organizer’s name to start an email.

    Thank you in advance!

    Geralynn

    Barry
    July 27, 2015| Permalink
    Hi Phil,

    It was decided to add additional escaping in our most recent release and that means the snippet provided last time round will no longer have the desired effect – sorry for the inconvenience on that count.

    With that in mind, though, the best way forward would be to create a template override. Copy:

    plugins/the-events-calendar/src/views/modules/meta/organizer.php
    To your theme:

    themes/YOUR_THEME/tribe-events/modules/meta/organizer.php
    Then find this line:

    <?php echo esc_html( $email ); ?>
    Change it to:

    “><?php echo esc_html( $email ); ?>
    Be sure to remove the snippet provided previously – does that help?

    #1282013
    Cliff
    Member

    Hi, Geralynn.

    I see you’re using the Avada theme, which is already overriding our template.

    Therefore, I think it’d be best for you to contact their support for how to modify this as you desire.

    Please let me know how that goes.

    #1282043
    Geralynn
    Participant

    Thank you for your reply. That is what I suspected as well. If I get it figured out, I will post the resolution here. 🙂

    #1282328
    Cliff
    Member

    Thank you for your understanding and that update.

    Please note that threads get Closed automatically after a couple weeks of inactivity. If it does get Closed, please open a new thread, adding your current issue description and also linking back to this thread.

    Thank you!

    #1282914
    Geralynn
    Participant

    I have my resolution! Avada advised me not to alter the .php files as they can cause conflicts.

    Now my organizer’s email is a live link and it does not show the actual email, but just the organizer’s name.

    Here is the code that resolved my issue:

    Add the below js code in theme options.
    wp-admin >> avada >> theme options >> advanced >> code fields

    <script>
    jQuery( document ).ready(function() {
    organizer_email = jQuery(“.tribe-organizer-email”).html();
    organizer_name = jQuery(“.tribe-organizer a”).html()
    jQuery(“.tribe-organizer-email”).html(‘‘+organizer_name+'</>’);
    });
    </script>

    I hope this helps someone else. 🙂

    #1283296
    Cliff
    Member

    I’m glad to hear. Thanks for sharing with us and other users. Have a great weekend.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Making the organizer’s email link live on single event pages’ is closed to new replies.