Home › Forums › Calendar Products › Events Calendar PRO › Unlink Venue and Organizer?
- This topic has 10 replies, 3 voices, and was last updated 7 years, 5 months ago by Cliff.
-
AuthorPosts
-
October 17, 2016 at 3:04 pm #1177974mountmadonnaschoolParticipant
All the relevant info for venues and organizers is listed on the single event page. The links to organizers and venues don’t give any information.
Is there a way to get rid of that href?
October 17, 2016 at 7:10 pm #1178095CliffMemberHi. I believe you’d need to use our Themer’s Guide for this.
You could override /wp-content/plugins/the-events-calendar/src/views/modules/meta/organizer.php with /wp-content/themes/[your-child-theme]/tribe-events/modules/meta/organizer.php
Then edit your theme’s organizer.php file to remove the use of tribe_get_organizer_link().
You can do something similar for the venue.php file in the same directory.
I hope this helps!
October 19, 2016 at 1:49 pm #1179438mountmadonnaschoolParticipantThis worked beautifully for organizer. I changed tribe_get_organizer_link() to tribe_get_organizer()
Venue, however, uses tribe_get_venue and still pulls the link. I can’t find a function that pulls the name of the venue without linking it.
October 19, 2016 at 2:40 pm #1179476CliffMemberAh, sorry about that. I believe you’re looking to override /wp-content/plugins/events-calendar-pro/src/views/pro/single-venue.php
Put your customized version at /wp-content/themes/[your-child-theme]/tribe-events/pro/single-venue.php
Let me know how it goes!
October 19, 2016 at 3:12 pm #1179495mountmadonnaschoolParticipantNo, it seems to be using venue.php…I added a dash to the text to see and it showed up via venue and not single-venue.
October 19, 2016 at 8:06 pm #1179628CliffMemberMy apologies. single-venue.php is for a view like this: http://wpshindig.com/venue/tecnoparque-pucpr/ (a single page of the Venue custom post type)
I figured it out:
- Since the Venue name is only linked when PRO is active, it’s coming from PRO.
- Line 19 of /wp-content/plugins/events-calendar-pro/src/Tribe/Single_Event_Meta.php leverages the tribe_get_venue filter to add the link
This code snippet is updated for v4.3 for both Venues and Organizers (so you can get rid of your theme override file if that’s your only customization).
Please let me know how it goes for you.
October 24, 2016 at 2:34 pm #1182138mountmadonnaschoolParticipantThis reply is private.
October 24, 2016 at 6:08 pm #1182218CliffMemberWelcome 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.
(Just make sure to remove the beginning
<?php
when you copy/paste the code into your PHP file. It’s required in the snippet to enable the syntax highlighting.)I hope this information helps!
October 26, 2016 at 11:36 am #1183334mountmadonnaschoolParticipantYes! That worked, thank you!
October 26, 2016 at 1:47 pm #1183394CliffMemberAwesome. I’m very glad to hear it.
Have a great rest of your week.
-
AuthorPosts
- The topic ‘Unlink Venue and Organizer?’ is closed to new replies.