Home › Forums › Calendar Products › Events Calendar PRO › Making the organizer’s email link live on single event pages
- This topic has 6 replies, 3 voices, and was last updated 8 years, 11 months ago by
Cliff.
-
AuthorPosts
-
May 9, 2017 at 11:08 am #1281106
Geralynn
ParticipantI 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?May 10, 2017 at 2:54 pm #1282013Cliff
MemberHi, 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.
May 10, 2017 at 4:05 pm #1282043Geralynn
ParticipantThank you for your reply. That is what I suspected as well. If I get it figured out, I will post the resolution here. 🙂
May 11, 2017 at 8:55 am #1282328Cliff
MemberThank 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!
May 12, 2017 at 6:35 am #1282914Geralynn
ParticipantI 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. 🙂
May 12, 2017 at 2:35 pm #1283296Cliff
MemberI’m glad to hear. Thanks for sharing with us and other users. Have a great weekend.
-
AuthorPosts
- The topic ‘Making the organizer’s email link live on single event pages’ is closed to new replies.
