Home › Forums › Calendar Products › Events Calendar PRO › Changing tooltip to display location
- This topic has 8 replies, 2 voices, and was last updated 8 years, 10 months ago by
Chuck.
-
AuthorPosts
-
May 10, 2017 at 3:00 pm #1282020
Chuck
ParticipantI’ve been trying to edit files following the Themer’s Guide, but I cannot figure out how to remove the excerpt and instead display the location in the tooltip under calendar view. Can you please help me out with this? Thanks!
May 11, 2017 at 1:51 pm #1282569Andras
KeymasterHello again Chuck,
Thanks for reaching out!
I can try to help out here, but I am limited in supporting customizations. Per our terms and conditions we support features of the plugins and although we try to help get you started on customizations for the most part you are going to have to take it on to complete.
To be able to do this you will probably need a bit of php and javascript.
You will need to create a template override for the wp-content\plugins\the-events-calendar\src\views\month\tooltip.php file in here:
wp-content\themes\your-child-theme\tribe-events\month\tooltip.php
You can find instructions on how our tooltips work at the beginning of this file:
wp-content\plugins\the-events-calendar\src\views\month\single-event.php
I hope this can get you started. Let me know if you need further guidance.
Cheers,
AndrasMay 25, 2017 at 7:22 pm #1289203Chuck
ParticipantI followed the instruction per this thread:
But, I’m still not getting the venue to list on the tooltip. What am I missing?
May 29, 2017 at 2:31 pm #1290503Andras
KeymasterHi Chuck,
So if you have this in place in the month/single-event.php
$venue = array(); $getvenue = tribe_get_venue(); $venue['venue'] = $getvenue;and
<span class="pl-e">data-tribejson</span>=<span class="pl-s"><span class="pl-pds">'</span><span class="pl-pse"><?php</span><span class="pl-s1"> <span class="pl-c1">echo</span> tribe_events_template_data( <span class="pl-smi">$post</span>, <span class="pl-smi">$venue</span> ); </span><span class="pl-pse"><span class="pl-s1">?</span>></span><span class="pl-pds">'</span></span>then all you need is
[[=venue]]in your month/tooltip.php file at the place where you want to show it.
I tested it now and it works.
Let me know where you get stuck.
Cheers,
AndrasMay 31, 2017 at 10:58 am #1291397Chuck
ParticipantI tried your code with no success. I actually had success after I reworked the code from this post:
Include venue details and Additional custom field in month/mobile.php
I’m still having issues though as it isn’t listing the address with city and state which is what I really need. What am I missing here?
-
This reply was modified 8 years, 10 months ago by
Chuck. Reason: add words
May 31, 2017 at 11:41 am #1291419Chuck
ParticipantI tried adding this code to my tooltip.php:
[[ } ]] [[ if(venue.length) { ]] <div class="tribe-event-venue">[[= venue]]</div> [[ } ]] [[ if(VenueAddress.length) { ]] <div class="tribe-event-venue">[[= VenueAddress]]</div> [[ } ]] [[ if(VenueCity.length) { ]] <div class="tribe-event-venue">[[= VenueCity]]</div> [[ } ]] [[ if(VenueState.length) { ]] <div class="tribe-event-venue">[[= VenueState]]</div> [[ } ]] [[ if(VenueZip.length) { ]] <div class="tribe-event-venue">[[= VenueZip]]</div> [[ } ]]Then I tried adding this code to my single-event.php:
$venue = array(); $getvenue = tribe_get_venue(); $venue['venue'] = $getvenue; $address = array(); $getaddress = tribe_get_address(); $address['VenueAddress'] = $getaddress; $city = array(); $getcity = tribe_get_city(); $city['VenueCity'] = $getcity; $state = array(); $getstate = tribe_get_state(); $state['VenueState'] = $getstate; $zip = array(); $getzip = tribe_get_zip(); $zip['VenueZip'] = $getzip;I’m clearly doing something wrong.
May 31, 2017 at 1:02 pm #1291452Andras
KeymasterHi Chuck,
You are almost there, good job so far.
In the single-event.php you create the “$venue” array and you need to use that for all of the data. So something like this:
$venue = array(); $getvenue = tribe_get_venue(); $getaddress = tribe_get_address(); $getcity = tribe_get_city(); $getstate = tribe_get_state(); $getzip = tribe_get_zip(); $venue['venue'] = $getvenue; $venue['VenueAddress'] = $getaddress; $venue['VenueCity'] = $getcity; $venue['VenueState'] = $getstate; $venue['VenueZip'] = $getzip;Then you should be able to use the shortcodes, though you might need to remove that space after the “=”, I’m not sure.
I’d suggest give that a try. And in case you still cannot get it to work, then you can peek at my files here. 😉
https://gist.github.com/andrasguseo/34b0ce16c1e700b01186266f89015dca
Cheers,
AndrasJune 22, 2017 at 9:35 am #1301803Support 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 -
This reply was modified 8 years, 10 months ago by
-
AuthorPosts
- The topic ‘Changing tooltip to display location’ is closed to new replies.
