Home › Forums › Calendar Products › Events Calendar PRO › Remove the Link to EVENT CATEGORY and ORGANIZER
- This topic has 4 replies, 2 voices, and was last updated 10 years, 6 months ago by
Geoff.
-
AuthorPosts
-
September 16, 2015 at 8:54 am #1005620
Jan
ParticipantHello there!
First of all: I love your plugin, thanks for the effort you guys are putting on it.
I saw a couple of threads regarding this topic, but haven’t been able to find a solution for my specific problem.On the Events Single page, I want to remove the links to the Event Organizer and the Category of Events (I want to keep these titles, but not to be linked to anything) Please check attachment

Could you give me a hint on how to do this?
Thanks in advance!
September 17, 2015 at 9:19 am #1006047Geoff
MemberHello Jan,
Good question and I’d be happy to help as best I can!
First off, you’ll want to override one of the calendar templates that make up the single event post:
- details.php : located at /wp-content/plugins/the-events-calendar/src/views/modules/meta/details.php
Make a copy of that template, then:
- Make a new folder in your theme directory called tribe-events
- Make a new folder in that one called modules
- Make a new folder in that one called meta
- Drop the template file in that last folder
Now that the templates are in your theme, they can be modified to suit your needs. In this case, you’ll want to replace the following in details.php (lines 104-117 for me):
<?php echo tribe_get_event_categories( get_the_id(), array( 'before' => '', 'sep' => ', ', 'after' => '', 'label' => null, // An appropriate plural/singular label will be provided 'label_before' => '<dt>', 'label_after' => '</dt>', 'wrap_before' => '<dd class="tribe-events-event-categories">', 'wrap_after' => '</dd>', ) ); ?>…with something like this:
<dt> <?php esc_html_e( 'Cost:', 'the-events-calendar' ) ?> </dt> <dd class="tribe-events-event-cost"> <?php esc_html_e( $cost ); ?> </dd> <?php endif ?> <dd class="tribe-events-event-categories"> <dt>Category:</dt> <?php $terms = get_the_terms(get_the_ID(), 'tribe_events_cat'); $count = count($terms); if ( $count > 0 ){ foreach ( $terms as $term ) { echo $term->name; } } ?> </dd>And, to remove the Organizer link, you can add this to your theme’s functions.php file:
add_filter( 'tribe_get_organizer', 'strip_tags', 20 );Will this work for you? Please let me know. 🙂
Geoff
September 22, 2015 at 1:41 am #1007376Jan
ParticipantDear Geoff, thanks for your assistance.
While the second fix (to remove the Organizer link) worked well, I haven’t yet fixed the first point (removing the link to the category).
I created the folders properly following your instructions but when I use the details.php file with the modified lines 104-117, all the description boxes disappear and the post stops after the Google Kalender / Ical Export links (Please check attachment)

Any idea why?
Thanks in advance for your support.
September 22, 2015 at 3:14 am #1007388Jan
ParticipantHey Geoff,
Nevermind, we decided that it’s also cool and functional to have a link to the Events Category, so we’ll keep it.Thanks for your support.
September 22, 2015 at 8:35 am #1007527Geoff
MemberMy pleasure and thanks for following up!
I’ll go ahead and close this thread but do please hit us up if there’s anything else we can do to help. 🙂
Cheers!
Geoff -
AuthorPosts
- The topic ‘Remove the Link to EVENT CATEGORY and ORGANIZER’ is closed to new replies.
