Home › Forums › Calendar Products › Events Calendar PRO › Show category in Event list wdget
- This topic has 6 replies, 2 voices, and was last updated 8 years ago by
Durk Oberman.
-
AuthorPosts
-
March 22, 2018 at 12:48 pm #1486372
Durk Oberman
ParticipantHi there,
On the frontpage of a website i use the widget Event List to show all the upcoming events.
What i can not find how to show also the category of the event.
Is that possible?
See the attached image for an example.I am using The Events Calender Pro and build the frontpage with Siteorigin Page Builder.
March 23, 2018 at 9:51 pm #1487573Jennifer
KeymasterHi Durk!
You can add in the category by customizing the widget template. Our themer’s guide has instructions on doing template overrides, and the template for the list widget can be found at wp-content/plugins/the-events-calendar/src/views/widgets/list-widget.php. The tribe_get_event_categories function will get you the categories.
We are a bit limited in the amount of support that we can provide for customizations, but if you get stuck or have any questions, please let me know – I’ll be happy to point you in the right direction!
Thanks,
Jennifer
April 4, 2018 at 11:36 am #1496738Durk Oberman
ParticipantHello Jennifer,
Sorry for my late answer. IThank for your answer. I will get in to it and i am hopefull it will succeed.
Thanks,
Durk
April 5, 2018 at 6:43 am #1497358Jennifer
KeymasterGreat! If there is anything else that I can help with, please let me know.
April 5, 2018 at 12:04 pm #1497854Durk Oberman
ParticipantHello Jennifer,
Still one question.
How and where do i put to code mentioned on tribe_get_event_categories into the list-widget.php?
I hope you can help me with that.Durk
April 6, 2018 at 11:46 am #1499013Durk Oberman
Participantfollowing my last post:
I have put the following code in the template list-widget.php:<?php echo tribe_get_event_categories(); ?>.Now the category is shown but there are also labels shown that i don’t want to be there.
I found in general.php at row 425 this piece of code:'label' => null, 'label_before' => '<div>', 'label_after' => '</div>'My question, is it posible to not show the label (word) Evenement and put the name of the category behind the label Categorie?
See also attachment.
Thank.
Durk
April 13, 2018 at 11:07 am #1506932Jennifer
KeymasterHi Durk,
I’m sorry about the delay here…try replacing
<?php echo tribe_get_event_categories(); ?>with
<?php
$args = array(
'label' => 'Categorie',
'label_before' => '<div class="list-widget-category-label">'
);
echo tribe_get_event_categories( $post->ID, $args );
?>Then, you can set the label and category to display on the same line by adding this CSS to the Additional CSS area under Appearance > Customize (if you have one) or to the style.css file of your child theme:
.tribe-events-adv-list-widget .list-widget-category-label, .tribe-events-adv-list-widget .tribe-event-categories {
display: inline-block;
}As I mentioned previously, customizations like this are outside the scope of support that is provided here in the forums, but I hope this helps you get things working the way you would like!
May 5, 2018 at 9:35 am #1523630Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Show category in Event list wdget’ is closed to new replies.
