gridview to display venue below event title?

Home Forums Calendar Products Events Calendar PRO gridview to display venue below event title?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #19582
    Beej
    Participant

    I’ve searched for hours here for a possible way to add the venue title directly below an event within the gridview page on my blog. I’ve seen it on other sites utilizing the plugin so I know it’s a possibility. Any help and direction on doing this is greatly appreciated =)

    #19608
    Rob
    Member

    Hey Beej. Thanks for the note here; we can definitely try to help you out, but would you mind pointing us to an example so we can see what you’re going for? I’m not sure I understand based on the description above. Thanks!

    #19616
    Beej
    Participant

    Hey Rob, try http://angelmg.com/events/ as a good reference. Also, what did they do within the table.php for that sized mouseover graphic with no text? I remember I found a slight hack a year ago that merely called out the graphic in the title of the event, such as: “Event name”. Many thanks.

    #19634
    Rob
    Member

    Hey Beej, thanks for the follow-up on this end – and for the link. Looks like there are two issues here: aiming to add the venue name into grid view, and make the featured image serve as the entire mouseover (removing text in the process).

    I’m going to need to bring in Jonah, our dev, to take a look here. My guess is that both are doable but I’m not sure the level of customization required for either. While we can’t provide specific customization work here on the forums we can try our best to point you in the right direction here. Stay tuned!

    #19690
    Jonah
    Participant

    Hey Beej,

    As Rob mentioned we can’t provide specific customization help here in the forum but I can offer you some ideas of how to accomplish this.

    First, the file you’re mainly going to want to be working with is /wp-content/plugins/the-events-calendar/views/table.php – to modify this make a copy and place in an ‘events’ folder in your theme. Now you can make any changes you want to table.php and they will be preserved the next time you update the plugin.

    In table.php find line 140 which is outputting the title in the tooltip. Below line 140 from lines 141 – 163 there is all the code for displaying the date information for the event, the content/excerpt and the post thumbnail in the tooltip. So basically you are going to want to most most of that so that only the thumbnail displays and the proper size displays. You can use the add_image_size() function for example to add additional image sizes to be user here: http://codex.wordpress.org/Function_Reference/add_image_size – or, use something like TimThumb to resize images on the fly (http://www.binarymoon.co.uk/projects/timthumb/).

    To bring in the venue, we can borrow some code from /wp-content/plugins/the-events-calendar/views/single.php – if you look for lines 63 – 67 you’ll find the following code:

    if( class_exists( 'TribeEventsPro' ) ):
    tribe_get_venue_link( get_the_ID(), class_exists( 'TribeEventsPro' ) );
    else:
    echo tribe_get_venue( get_the_ID() );
    endif;

    If you want to link to the Venue you will want to use tribe_get_venue_link( $post->ID ) but if you only want the name you will want to use tribe_get_venue( $post->ID ). Either of those functions can be placed wherever you want the venue to display on the calendar.

    Hopefully that points you in the right direction! Let me know if you have any questions with this.

    Cheers,
    Jonah

    #976926
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘gridview to display venue below event title?’ is closed to new replies.