Home › Forums › Calendar Products › Events Calendar PRO › Remove the "Event Category" under Details on the single event view
- This topic has 11 replies, 3 voices, and was last updated 9 years ago by Barry.
-
AuthorPosts
-
March 13, 2015 at 9:03 am #948170meredyParticipant
I would like to remove the category label and link from the single event details view. How would I do that?
Details
Date:
Time:
Event Category: (this is the one I want to delete from this view)
Duration:
Additional Performances:March 13, 2015 at 3:36 pm #948250BarryMemberHi there!
The first thing to do is read through our Themer’s Guide, which covers the basics of safely overriding and customizing our templates. In this particular case you will probably wish to modify modules/meta/details.php.
Within that file, simply look for and remove the following section of code:
<?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>' ) ); ?>
Does that help?
March 29, 2015 at 4:43 pm #951741LarsParticipantHi
We are trying to do the same but with no luck. It doesn’t make any difference.
Actually deleting the whole “modules” folder makes no difference. Are we missing something here? Has these files moved to a different location?
March 30, 2015 at 7:06 am #951837BarryMemberHi Lars,
Actually deleting the whole โmodulesโ folder makes no difference. Are we missing something here?
Perhaps the problem and cause are different in your case? Would you mind posting a fresh topic of your own for this?
Thanks!
March 30, 2015 at 8:06 am #951871LarsParticipantSorry, this was due to server cache. What you suggest regarding removing categories works fine.
March 30, 2015 at 8:22 am #951917March 31, 2015 at 8:43 am #952257meredyParticipantthanks for the code!
March 31, 2015 at 1:23 pm #952331meredyParticipantOne more question–if I apply this code will it only remove the category link from the “single event page”? In other words could I still type in “http://mysite/events/category/some-category/” and get a calendar page?
March 31, 2015 at 1:27 pm #952333BarryMemberExactly, yes. We’re changing the information shown in single event pages – but we aren’t stopping visitors from querying for events in a particular category … so:
In other words could I still type in โhttp://mysite/events/category/some-category/โ and get a calendar page?
Yes, that’s correct ๐
March 31, 2015 at 1:52 pm #952343meredyParticipantGreat! Now I just have to get comfy with where to place this code as I am using Church-Event template and they already have a tribe events folder which doesn’t have details.php in it–so do I go back to your plugin folder and grab the details.php file and stick it (altered) into their tribe-events/modules/meta folder (along with the only other file they have there (organizer.php))?
March 31, 2015 at 4:04 pm #952396BarryMemberSo assuming they haven’t done anything really crazy, yes, you would copy modules/meta/details.php from the plugin’s views directory and add it to your theme’s tribe-events directory, so you end up with:
themes/YOUR_THEME/tribe-events/modules/meta/details.php
Just as you said, really ๐
April 20, 2015 at 7:09 am #956642BarryMemberHi!
It’s been a while so I’m going to go ahead and close this topic.
- Need help with anything else? Go right ahead and post a new topic, one of the team will be only too happy to help
- Still need help with this issue and need to re-open it? Again, please simply create a new topic and link to this one to provide the team with some context
Thanks!
-
AuthorPosts
- The topic ‘Remove the "Event Category" under Details on the single event view’ is closed to new replies.