Home › Forums › Calendar Products › Events Calendar PRO › Extension: Link Events to Website URLs
- This topic has 10 replies, 3 voices, and was last updated 8 years, 1 month ago by
Cliff.
-
AuthorPosts
-
February 26, 2018 at 11:07 pm #1464530
Weng
ParticipantHi Help Desk
I’m using the above extension and wondered if there was an easy way to make each link open in a new tab?
Thanks
WengFebruary 27, 2018 at 9:45 pm #1465557Cliff
MemberHi, Weng.
If you’re referring to this extension: https://theeventscalendar.com/extensions/make-event-titles-link-to-the-event-website-url/
Then the answer is no.
You could add your own custom code in addition to this extension to accomplish this though:
https://gist.github.com/cliffordp/3bdd3857f905c0927dc5c5594f97e319
Please let me know how this goes for you.
If it works for you, I can add it to the Extension’s article.
February 28, 2018 at 1:42 am #1465663Weng
ParticipantThanks Cliff, I really appreciate the code. But I didn’t know where to add it. I tried adding it to my theme’s function php and tribe-events -> pro -> photo -> single-event php without any luck.
February 28, 2018 at 8:43 pm #1466713Cliff
MemberWelcome to WordPress customizing!
Best practice for adding custom code (like to implement a PHP snippet to modify The Events Calendar) is to create a functionality plugin, unless it’s something specific to your theme, in which case best practice is to make sure you’re using a child theme, then add the customization to your child theme’s functions.php file (not single-event.php).
Note that the opening <?php tag should be removed from our snippets when adding to your plugin file or your functions.php file (it’s only added to enable syntax highlighting)… unless the snippet is a complete file replacement.
I hope this information helps!
March 3, 2018 at 2:47 pm #1469228Weng
ParticipantHi Cliff
I tried both approaches (functionality plugin and functions.php) but couldn’t get either to achieve what I want.
By doing the former, I got the code appearing at the top of the web page itself. By doing the latter, there was no apparent effect.
Thanks again for your help. I guess the extension as it is will have to do.
Cheers
WengMarch 8, 2018 at 10:38 am #1473701Cliff
MemberSorry to hear that.
If you send me the plugin you created where it appeared on your page, I might be able to take a look and help figure it out for you.
March 10, 2018 at 5:02 pm #1475731Weng
ParticipantHi Cliff
Thanks, you’ve already done more than I would have expected. I tried to upload the php file using the upload below but I get an error message (‘you can’t upload files of this type’).
Happy for you to close this if it’s going beyond what help desk can reasonably do.
Cheers
WengMarch 10, 2018 at 10:19 pm #1475851Cliff
MemberPut the .php file in a .zip and try.
March 11, 2018 at 9:23 pm #1476170Weng
ParticipantHi Cliff
I’ve found a plugin that does the trick (Open External Links in a New Window).
Thanks again for all your help.
Weng
March 12, 2018 at 7:17 am #1476481Cliff
MemberSounds good. Thanks for the update.
-
AuthorPosts
- The topic ‘Extension: Link Events to Website URLs’ is closed to new replies.
