Altering Event Tooltip display / displaying Additional Fields in tooltips

Home Forums Calendar Products Events Calendar PRO Altering Event Tooltip display / displaying Additional Fields in tooltips

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1020548

    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?

    #1020812
    Nico
    Member

    Howdy 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,
    Nico

    #1022263

    I’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.

    #1022647
    Nico
    Member

    This reply is private.

    #1022862

    I really appreciate it. I look forward to your next post.

    #1023065
    Nico
    Member

    Hi 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,
    Nico

    #1023584

    Thank you so much for your help.

    #1024022
    Nico
    Member

    You 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

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Altering Event Tooltip display / displaying Additional Fields in tooltips’ is closed to new replies.