Shortcode for latest events on homepage in 4 columns

Home Forums Calendar Products Events Calendar PRO Shortcode for latest events on homepage in 4 columns

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1157111
    Mr. Peri
    Participant

    Hi,

    Is there a shortcode for me to list the latest events on my website’s home page in a row in 4 columns? If I add the [tribe_events_list] code it makes a very ugly very long list l below one another. I want something like how the single event would look if you add it to a post, but it needs to be in 4 columns and it needs to update to the latest events, or the next 4 upcoming events.

    #1157263
    Geoff
    Member

    Hey Chris, thanks for getting in touch!

    I’m afraid there is not a shortcode that will give you that specific layout.

    I do think this is possible, though it will take a fair amount of custom development to make it happen. For example, you could override the Event List widget templates to create your own layout for when it’s embedded in pages and posts. Or, you could create your own query of events using the tribe_get_events function and then style the output from there with CSS.

    Does this make sense and will it work for you? Please let me know. 🙂

    Cheers!
    Geoff

    #1157275
    Mr. Peri
    Participant

    Is there then perhaps a shortcode to add the events to a row the same way it looks like in Photo View on the calendar page?

    #1157277
    Geoff
    Member

    I really wish there was — however, the only shortcodes that are available are the ones that are included in Events Calendar PRO to embed the widgets. I really do think that overriding the widget templates or using the tribe_get_events function to create a custom query of events are the two best ways to go for that sort of customization.

    Geoff

    #1157482
    Mr. Peri
    Participant

    Ok, I actually came right by adding a post grid and then select the events as the data source instead of posts, then at then to order in the meta value _EventStartDate. Doesn’t look to bad: http://sleer.peridemo.co.za/
    Only thing now…is there a way to edit the meta key _EventStartDate to show the date in another format?

    #1157554
    Geoff
    Member

    Nice work, Chris!

    You should be able to format the date — I haven’t tested this, but think at least something similar would do the trick:

    $date = get_post_meta($post->ID, '_EventStartDate', true);
    
    if($date != ''){
    echo date("l, F j, Y", strtotime($date)); // or whatever format you'd like
    }

    Cheers!
    Geoff

    #1157582
    Mr. Peri
    Participant

    Fantastic! Will test that. Thank you! Loving the plugin, even more so the support. Good work and proper, swift feedback!

    #1157677
    Geoff
    Member

    My pleasure! I am so stoked that you’re loving the plugin — in fact, if you have a moment we’d love for you to leave us a review. 🙂

    I’ll go ahead and close this thread but thanks a ton for following up and definitely let us know if any other questions pop up — we’d be happy to help.

    Cheers!
    Geoff

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Shortcode for latest events on homepage in 4 columns’ is closed to new replies.