Home › Forums › Calendar Products › Events Calendar PRO › Show categories on individual events
- This topic has 4 replies, 3 voices, and was last updated 10 years ago by
Support Droid.
-
AuthorPosts
-
April 3, 2016 at 8:37 am #1097540
Deena
ParticipantHi, I’d like to know if there is a any way to have the categories of a specific event show on that event’s post.
Thanks,
DeenaApril 4, 2016 at 10:57 pm #1098196Brook
ParticipantHowdy Deena,
That sounds very doable. But there are a few ways to understand what you’re request, would you mind clarifying a bit for me so I can give you specific instructions?
You will notice that by default the event categories do display for each individual event. For instance go here and scroll down, you will see the labe “Event Categories” and underneath the category that its filed under. Is your theme not showing this? Do you have a link to it? Or are you trying to show the categories on a different page?
Cheers!
– Brook
April 5, 2016 at 5:57 am #1098264Deena
ParticipantHi Brook,
Thanks for your reply! You’re right, the categories do show, they just show low down so I forgot that they’re there. š So I guess my question is now, how can I have them show at the top of the events?
Here is an example: http://thingstodoinjerusalem.com/event/burlesque-the-body-the-feminist-dilemma/
Thanks,
DeenaApril 6, 2016 at 4:34 am #1098844Brook
ParticipantYou are welcome!Ā Thanks for elaborating.
This should be fairly straight forward to do, it will require a little bit of comfort with modifying your theme files. I’ll break down each step:
- Familiarize yourself with theĀ Themer’s Guide
- Create a theme override forĀ /the-events-calendar/src/views/single-event.php
- Copy/paste the following code into that override:
<?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>', ) ); ?>That code shows the event categories. It wraps each category in the css class .tribe-events-event-categories so you can style it from there. You can paste that code anywhere you want in the theme override, perhaps right underneath the title?
Does that all make sense? Will that work for you? Please let me know.
Cheers!
– Brook
April 21, 2016 at 9:35 am #1105442Support 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 ‘Show categories on individual events’ is closed to new replies.
