Home › Forums › Calendar Products › Events Calendar PRO › changing the elements of an event in list view
- This topic has 7 replies, 2 voices, and was last updated 5 years, 7 months ago by carosch.
-
AuthorPosts
-
August 27, 2018 at 4:55 am #1606426caroschParticipant
Hello,
Please can I have help to change event’s elements in a list view ?
In the “all events” page (all events listed under the filter bar), I want to define the information I need to display, and where.
For exemple, I need to display:
First column:
– Title
– Date
Second column:
– an image which is related to a specific tag
– I don’t want the event picture
– for the location I only need the location name and the town
and
– I need to give the event block a specific background-color related to a specific tag.Where must I go to make all this changes for the events list ?
thank you
CarolineAugust 28, 2018 at 8:45 am #1607685JeremyKeymasterHi Caroline,
Thanks for reaching out to us! I’d be happy to help you 🙂
To modify the events in the list view, you need to customize our template files within your child theme. You’ll find all some useful resources on this page:Â https://theeventscalendar.com/knowledgebase/themers-guide/
In your case, you need to make a copy of this this file:
/wp-content/plugins/the-events-calendar/src/views/single-event.php
Then you can override this template in your own theme by creating a file at [your-theme]/tribe-events/list/single-event.php.
I hope this helps.
Please let me know if you have any other questions.
Cheers,
JeremyAugust 28, 2018 at 9:15 am #1607728caroschParticipantHi,
thank you for the answer,
may I ask if that will change the layout of a single event view?
or the layout of each event in the list view ?I’m afraid I didn’t understand where I must act.
Caroline
August 29, 2018 at 12:48 am #1608465JeremyKeymasterOups Caroline, I realized I made a mistake in the path I gave you!
It should have been:
/wp-content/plugins/the-events-calendar/src/views/list/single-event.php
I’m really sorry about that. This way, you could modify the layout of each event in the list view.
Please tell me if you need more explanations.
Cheers,
JeremyAugust 29, 2018 at 2:13 pm #1609226caroschParticipantThanks
I succeed but only with css, because I didn’t find in this file the details like zip code, or <br>, or street…
At least, I know where is the files for the list view.
Caroline
August 30, 2018 at 12:37 am #1609454JeremyKeymasterHi Caroline,
In the file I mentioned, venue details and venue address are called via two php functions: tribe_get_venue_details() and tribe_get_address().
However, it’s true you can make most of the changes you wanted via css. Do you need help to finalize your css?
Cheers,
JeremySeptember 5, 2018 at 8:47 am #1614183caroschParticipantHi,
I succeed for the list.
Thank you.
Caroline
September 6, 2018 at 12:03 am #1614864JeremyKeymasterHi Caroline,
I’m glad you managed to solve your problem regarding the list.
I’m going to close this thread then, but feel free to start a new one if you have further concerns 🙂
Cheers,
Jeremy -
AuthorPosts
- The topic ‘changing the elements of an event in list view’ is closed to new replies.