Alter the Venue / Organizer URL

Home Forums Calendar Products Events Calendar PRO Alter the Venue / Organizer URL

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1004716
    Erin Weiffenbach
    Participant

    Yes, I have searched through the support forums and found solutions, however those threads were over two years old, and the schematic for the Event Calendar 3.12.1 has changed. The codes provided in the threads doesn’t work with the current version.

    I am looking to do the same thing as this instruction below however for the Venue and Organizer URLs (Link to tutorial: https://theeventscalendar.com/knowledgebase/url-as-word-button/). Can you give me the correct code or an equivalent for the Organizer / Venue URL?

    Best regards,
    Josh S.

    #1004946
    George
    Participant

    Hey @wsansewjs,

    To modify the HTML for the Organizer URL, you’d use basically the same approach as the tutorial you linked to, but you’d use the filter tribe_get_organizer_website_link instead. To see this filter and learn how it works, and what you can customize with it via code, head to src/functions/template-tags/organizer.php in your plugin files for The Events Calendar. This function is in the file there.

    Similarly, the venue URL is filterable with tribe_get_venue_website_link – head to src/functions/template-tags/venue.php to find this function and learn more about its inner workings.

    Here’s a quick example that would add the class name “example-class” to the organizer link so that you could style it to look like a button or something:


    add_filter( 'tribe_get_organizer_website_link', 'tribe_19028_example' );

    function tribe_19028_example( $html ) {
    $post_id = tribe_get_organizer_id( get_the_ID() );
    $url = tribe_get_event_meta( $post_id, '_OrganizerWebsite', true );

    if ( empty( $url ) ) return $html;

    return sprintf( 'Custom organizer Link – style it to your liking! :)', $url );
    }

    Best of luck with your customizations!

    — George

    #1009620
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Alter the Venue / Organizer URL’ is closed to new replies.