Home › Forums › Calendar Products › Events Calendar PRO › Shortcode for latest events on homepage in 4 columns
- This topic has 8 replies, 3 voices, and was last updated 7 years, 8 months ago by Mr. Peri.
-
AuthorPosts
-
August 29, 2016 at 9:20 am #1157111Mr. PeriParticipant
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.
August 29, 2016 at 2:09 pm #1157263GeoffMemberHey 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!
GeoffAugust 29, 2016 at 2:29 pm #1157275Mr. PeriParticipantIs 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?
August 29, 2016 at 2:35 pm #1157277GeoffMemberI 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
August 30, 2016 at 4:13 am #1157482Mr. PeriParticipantOk, 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?August 30, 2016 at 8:23 am #1157554GeoffMemberNice 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!
GeoffAugust 30, 2016 at 9:00 am #1157582Mr. PeriParticipantFantastic! Will test that. Thank you! Loving the plugin, even more so the support. Good work and proper, swift feedback!
August 30, 2016 at 9:45 am #1157677GeoffMemberMy 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 -
AuthorPosts
- The topic ‘Shortcode for latest events on homepage in 4 columns’ is closed to new replies.