make-links-event-go-straight-event-website

Home Forums Calendar Products Events Calendar PRO make-links-event-go-straight-event-website

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1479393
    Marc
    Participant

    Hello,

    I had this working before your latest upgrade.
    https://theeventscalendar.com/knowledgebase/make-links-event-go-straight-event-website/

    However, your new calendar pro overwrote the extra code and now I cannot find the file to edit. The directory structure is different. Can you point me in the direction of how to make the calendar point to the product URL again.

    Thanks, marc

    #1480576
    Jennifer
    Keymaster

    Hi Marc,

    I’ll be happy to point you in the right direction here.

    It sounds like you’re referring to the single event links from the main calendar views (month view, list view, etc.)? If so, I just tested out this snippet in my local environment, and it is replacing the links:

    /*
    * This changes the event link to the event website URL if that is set.
    * NOTE: Comment out the add_filter() line to disable this function.
    */
    function tribe_set_link_website ( $link, $postId ) {
    $website_url = tribe_get_event_website_url( $postId );
    // Only swaps link if set
    if ( !empty( $website_url ) ) {
    $link = $website_url;
    }
    return $link;
    }
    add_filter( 'tribe_get_event_link', 'tribe_set_link_website', 100, 2 );

    Can you give that a try and see if it works for you? This should be added to the functions.php file of your child theme, where it will be safe from any plugin or theme updates. If you are overriding the templates, our themer’s guide has additional instructions on how to copy the template into the correct folder in your child theme, where it will also be safe from plugin updates. Any changes made directly to the plugin files will be erased each time you update the plugin.

    Please let me know if you have any questions or if I’ve misunderstood what you’re looking for.

    Thanks,

    Jennifer

    #1498790
    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 3 posts - 1 through 3 (of 3 total)
  • The topic ‘make-links-event-go-straight-event-website’ is closed to new replies.