Home › Forums › Calendar Products › Events Calendar PRO › Alter the Venue / Organizer URL
- This topic has 2 replies, 3 voices, and was last updated 11 years ago by
Support Droid.
-
AuthorPosts
-
September 13, 2015 at 7:19 pm #1004716
Erin Weiffenbach
ParticipantYes, 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.September 14, 2015 at 11:23 am #1004946George
ParticipantHey @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
September 29, 2015 at 7:05 am #1009620Support Droid
KeymasterThis 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. -
AuthorPosts
- The topic ‘Alter the Venue / Organizer URL’ is closed to new replies.
