Extension: Link Events to Website URLs

Home Forums Calendar Products Events Calendar PRO Extension: Link Events to Website URLs

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1464530
    Weng
    Participant

    Hi 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
    Weng

    #1465557
    Cliff
    Member

    Hi, 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.

    #1465663
    Weng
    Participant

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

    #1466713
    Cliff
    Member

    Welcome 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!

    #1469228
    Weng
    Participant

    Hi 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
    Weng

    #1473701
    Cliff
    Member

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

    #1475731
    Weng
    Participant

    Hi 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
    Weng

    #1475851
    Cliff
    Member

    Put the .php file in a .zip and try.

    #1476170
    Weng
    Participant

    Hi Cliff

    I’ve found a plugin that does the trick (Open External Links in a New Window).

    Thanks again for all your help.

    Weng

    #1476481
    Cliff
    Member

    Sounds good. Thanks for the update.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Extension: Link Events to Website URLs’ is closed to new replies.