Comments Julien Rusev started the conversationMay 20, 2019 at 11:28amHello, Is it possible to display Event Icon, Event Location and Event Start Date in my homepage? I was trying to find an icons or variables into database but I couldn`t. Thanks for attention !!! :) 877Zhivko repliedMay 25, 2019 at 11:33amHi, Could you elaborate? You want to display this data outside the calendar or in specific calendar view? Outside the calendar you can query an event with php like this: <?php $event_id = 2413; $event = new Stachethemes\Stec\Event_Post($event_id); $icon = $event->get_icon(); $location = $event->get_location(); $start_date = $event->get_start_date();?> Stachethemes DeveloperJulien Rusev repliedMay 27, 2019 at 1:46pmHello, I am trying to display this data outside the calendar, in other plugin. This plugin display my events in slider. I attached some screenshots. I already have description and background image in front end, but can`t find event logo, event date and event location.I tried to query event with php but nothing is happens...Best regards! 877Zhivko repliedMay 30, 2019 at 1:14pmTry this code: <?php $events = \Stachethemes\Stec\Events::get_events(); if ($events) { foreach ($events as $event) { if (!($event instanceof \Stachethemes\Stec\Event_Post)) { continue; } $title = $event->get_title(); $date = \Stachethemes\Stec\Admin_Helper::get_the_timespan($event, 0, true); $short_description = $event->get_description_short(); $full_description = $event->get_description(); $images = $event->get_parsed_images(); if ($images) { $images = array_map(function($image) { return $image->src; }, $images); } // example echo "<p>{$title}</p>"; echo "<p>{$date}</p>"; echo "<p>{$short_description}</p>"; foreach ($images as $src) { echo "<img src='{$src}' />"; } } } ?> Stachethemes Developer Sign in to reply ...
Hello,
Is it possible to display Event Icon, Event Location and Event Start Date in my homepage? I was trying to find an icons or variables into database but I couldn`t.
Thanks for attention !!! :)
Hi,
Could you elaborate?
You want to display this data outside the calendar or in specific calendar view?
Outside the calendar you can query an event with php like this:
Stachethemes Developer
Hello,
I am trying to display this data outside the calendar, in other plugin. This plugin display my events in slider.
I attached some screenshots. I already have description and background image in front end, but can`t find event logo, event date and event location.
I tried to query event with php but nothing is happens...
Best regards!
Try this code:
Stachethemes Developer