Home › Forums › Calendar Products › Events Calendar PRO › Unlink Venue and Organizer?
- This topic has 10 replies, 3 voices, and was last updated 9 years, 6 months ago by
Cliff.
-
AuthorPosts
-
October 17, 2016 at 3:04 pm #1177974
mountmadonnaschool
ParticipantAll 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 #1178095Cliff
MemberHi. 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 #1179438mountmadonnaschool
ParticipantThis 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 #1179476Cliff
MemberAh, 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 #1179495mountmadonnaschool
ParticipantNo, 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 #1179628Cliff
MemberMy 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 #1182138mountmadonnaschool
ParticipantThis reply is private.
October 24, 2016 at 6:08 pm #1182218Cliff
MemberWelcome 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
<?phpwhen 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 #1183334mountmadonnaschool
ParticipantYes! That worked, thank you!
October 26, 2016 at 1:47 pm #1183394Cliff
MemberAwesome. 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.
