Home › Forums › Calendar Products › Events Calendar PRO › Show city instead of state/province in event preview + single event description
- This topic has 8 replies, 3 voices, and was last updated 9 years, 7 months ago by
Manuela Hernandez Perez.
-
AuthorPosts
-
September 27, 2016 at 2:21 am #1169097
Manuela Hernandez Perez
ParticipantHi,
I need to make a little modification in the display of the venue. It is in the event preview and in the single event description. It should not affect the display of the event list in the sidebar widget.
pw: Oevrg1!*What I practically need is that the city is shown instead of the state/province, as shown in the two screenshots below:
Event preview:
http://prntscr.com/cmvdseSingle event description:
http://prntscr.com/cmvfe3Can you please help me realizing this?
Thank you very much in advance!Best regards,
ManuelaSeptember 27, 2016 at 2:07 pm #1169498Andras
KeymasterGrüss dich Manuela
Thanks for using our plugins and reaching out! Let me try to help you with this.
You will need to do some template customization for that. Here are 2 articles that should get you started:
https://theeventscalendar.com/knowledgebase/themers-guide/
https://theeventscalendar.com/knowledgebase/template-overview/
You will need to customize this file for the single event view:
wp-content\plugins\the-events-calendar\src\views\modules\meta\venue.phpAnd this file for the list view:
wp-content\plugins\the-events-calendar\src\views\list\single-event.phpLet me know if this gets you started.
Cheers,
AndrasSeptember 27, 2016 at 2:18 pm #1169510Manuela Hernandez Perez
ParticipantHi Andras, thank you so much for your fast reply! I found the files, but my problem is that I’m not at all experienced with php. Can you please help me to exchange the state/province by the city in both views?
September 28, 2016 at 3:34 am #1169695Andras
KeymasterHi Manuela,
Let’s try the easier solution first. If you don’t fill out the Bundesland / Kanton / Provinz for the venue, then it will not show up. Like on this screenshot.
Left shows how the venue is set up for the event. Top right is the list view. Bottom right is the single event view.
Let me know if this helps. If you want to get into a bit of customization, we can, I just thought this might be easier.
Cheers,
AndrasSeptember 28, 2016 at 5:02 am #1169711Manuela Hernandez Perez
ParticipantHi Andras, thank you. Indeed, this could be a solution, but unfortunately not in my case because I need to show the real state/province information in another context as well (namely in the sidebar with the upcoming events widget).
Could you please help me making the customizations for showing the city instead of the state/province information in the event preview and the event description?September 29, 2016 at 2:28 am #1170260Andras
KeymasterHi Manuela,
Here is the file for the list view. Create a single-event.php file to the following folder, and copy the below snippet in the file:
wp-content/themes/{your-theme}/tribe-events/list/single-event.php
https://gist.github.com/andrasguseo/36ee590a9c321a782a20bf5219d1cdc9
For the single event view, create a venue.php file to the following folder and copy the below snippet there:
wp-content/themes/{your-theme}/tribe-events/modules/meta/venue.php
https://gist.github.com/andrasguseo/2d85f4ae41ccf40ecd74e8906caf3a0e
Let me know how this works out.
Cheers,
AndrasSeptember 29, 2016 at 2:51 am #1170267Manuela Hernandez Perez
ParticipantIt is perfect!! Thank you so much! 🙂
September 29, 2016 at 3:44 am #1170275Andras
KeymasterGreat, glad it helped! I am going to go ahead and close this ticket, but if you need help on this or something else, don’t hesitate to open a new topic.
Cheers,
AndrasPS: If you like our plugin, we would be happy to receive a review in the wordpress.org repository. Thanks!
https://wordpress.org/support/view/plugin-reviews/the-events-calendarPS2: We’d be also grateful if you would give us feedback on your satisfaction with support. Just click on one of the classy looking emojis below. 🙂 If you can spare a few words, that’s even better. Doublethanks!
-
AuthorPosts
- The topic ‘Show city instead of state/province in event preview + single event description’ is closed to new replies.
