add venue to month tooltip

Home Forums Calendar Products Events Calendar PRO add venue to month tooltip

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #929393
    Khanh
    Participant

    Hi,

    I want to add venue info to month tooltip.

    I added the following line to month/tooltip.php in <my-theme>/tribe-events folder

    <p>Venue : <?php echo tribe_get_venue_link(); ?></p>

    But the venue is not getting refreshed according to the event hover.

    Can you tell what am i doing wrong.

    #929409
    Geoff
    Member

    Hi there, James! Welcome to the forums. 🙂

    Good question and you’re on the right path. We’re limited in supporting custom development questions like this, but let’s see if I can at least point you in the right direction.

    First off, you’ll want to put both month/tooltip.php and month/single-event.php in your theme’s tribe-events folder.

    Then, in single-event.php, you’ll need to define the variable and bracket for the venue. In this case that might look something like this, starting on Line 22:

    $venue = array();
    $getvenue = tribe_get_venue();
    $venue['venue'] = $getvenue;

    Then, you’ll need to call that variable in the template. To do that, head down to the bottom of the code and add the $venue variable to tribe_events_template_data():

    <?php echo tribe_events_template_data( $post, $venue ); ?>

    With this in place, you can now add the venue to your tooltip.php template by adding [[=venue]] where you would like it to display.

    Cheers!
    Geoff

     

    #929441
    Khanh
    Participant

    Hi Geoff, Thanks for the answer.

    I tried the following in single-event.php

    added

    $venue = array();
    $getvenue = tribe_get_venue();
    $venue[‘venue’] = $getvenue;
    at lines 23-25

    added tribe_events_template_data( $post, $venue ); right before ?> line 191, removed echo as it is printing on the calendar

    changed the line in tooltip.php to <p>Venue :: [[=venue]]</p>

    Now the hover tooltip stopped working, tried with add/del venue line.

    Thanks

    Thanks

    #929863
    Geoff
    Member

    Shoot, that’s no good! Sorry about that.

    I was able to get the Venue to display using the steps I provided earlier, so you might need to check your code. Also, take a look at the notes in the month/single-event.php because they contain very detailed instructions on how to modify the tooltip–basically a more thorough explanation of the steps I provided. 🙂

    Cheers!
    Geoff

    #929893
    Khanh
    Participant

    This reply is private.

    #929961
    Geoff
    Member

    Hey there, James! Thanks for following up and sharing your code.

    Like I mentioned earlier, custom development isn’t something we’re able to provide here in the forums. That said, here’s the working example of the <i>month/single-event.php</i> used to get the Venue to display:

    https://gist.github.com/geoffgraham/47a2110f77e2507ad9c6

    With that, you can go into your month/tooltip.php file and simply use [[=venue]] where you want the venue to display in the tooltip.

    I hope this helps and good luck!

    Geoff

    #930035
    Khanh
    Participant

    Hi Geoff,

    Thanks for the information.

    I made it to work with slightly changing the code as per the following thread

    Add custom fields to tooltip in month view

    It works for me. Thanks Again for your help.

    Thanks

    #930046
    Geoff
    Member

    Awesome, I’m stoked that helps!

    I’ll go ahead and close this thread but please feel free to his us up with a new one if anything else comes up–we’d be happy to help. 🙂

    Cheers!
    Geoff

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘add venue to month tooltip’ is closed to new replies.