Home › Forums › Calendar Products › Events Calendar PRO › Altering Event Tooltip display / displaying Additional Fields in tooltips
- This topic has 7 replies, 2 voices, and was last updated 8 years, 5 months ago by Nico.
-
AuthorPosts
-
October 31, 2015 at 4:27 pm #1020548Lois Gilbert GilbertParticipant
I’m attempting to alter the information displayed in Event Tooltips but, despite changes in the page source appearing, the display does not change.
Ideally, I’d like to remove the event time (Doors time, in our setup) and replace it with an Additional Field we are displaying (on the single event page) for show times. Following guidance from other forum posts, I’ve tried to remove the Time and endTime using the $additional filter on tribe_events_event_schedule_details(). It adds that setting to the JSON string (I can see it in the source) but the display does not change.
Could anybody shed some light on how to accomplish this please?
November 2, 2015 at 7:45 am #1020812NicoMemberHowdy Lois,
Welcome to our support forums and thanks for reaching out to us. I’ll help getting this right 🙂
Have you read our Themer’s guide? That should be the place to start. You can also find detailed instructions on how to do this as comments in the tooltip template (wp-content/plugins/the-events-calendar/src/views/month/single-event.php).
Please take a look at the guide and also to the instructions present in the template, I guess that should get you started but let me know how it goes,
Best,
NicoNovember 5, 2015 at 10:20 am #1022263Lois Gilbert GilbertParticipantI’ve followed the directions in the Themer’s Guide to no avail. The basic event time still displays and there are no instructions I can find about how to adapt the information displayed and include Additional Fields. Hence my writing this support post in the first place.
November 6, 2015 at 12:03 pm #1022647NicoMemberThis reply is private.
November 7, 2015 at 10:05 am #1022862Lois Gilbert GilbertParticipantI really appreciate it. I look forward to your next post.
November 8, 2015 at 12:14 pm #1023065NicoMemberHi Lois,
Thanks for your patience on this! I’ll walk you trough the process of customizing the tooltip:
Passing additional data to the tooltip
- Create the following folder structure ‘tribe-events/month/’ inside your theme folder (‘wp-content/themes/your_theme/’).
- Make a copy of the file ‘single-event.php’ located at ‘wp-content/plugins/the-events-calendar/src/views/month/’.
- Drop the copied file into the ‘tribe-events/month/’ folder you just created in your theme.
- Edit the copy of ‘single-event.php’ like shown below. Please note that apart from creating the $additional_data array, we are passing it as the second parameter to tribe_events_template_data on line 9:
https://gist.github.com/niconerd/23416e3b69db753a6017
Displaying additional data in the tooltip
- Make a copy of the file ‘tooltip.php’ located at ‘wp-content/plugins/the-events-calendar/src/views/month/’.
- Drop the copied file into the ‘tribe-events/month/’ folder in your theme.
- Edit the copy of ‘tooltip.php’ like shown below:. Line 18 is the one I added to display the variable we just added in ‘single-event.php’ template, the name for the variable is the same as the one in the $additional_data array key
https://gist.github.com/niconerd/75a7ed329285073ce73a
Removing data from the tooltip
Now that you have a copy of the ‘tooltip.php’ template inside your theme folder, you can customize it to fit your needs: delete or add the html and variables you need for your site!
Hope this step-by-step helps you out,
Best,
NicoNovember 9, 2015 at 9:19 pm #1023584Lois Gilbert GilbertParticipantThank you so much for your help.
November 10, 2015 at 8:49 pm #1024022NicoMemberYou are welcome Lois! Glad to be of service 🙂
I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.
Best,
Nico -
AuthorPosts
- The topic ‘Altering Event Tooltip display / displaying Additional Fields in tooltips’ is closed to new replies.