I’m trying to create two tiles within a Gutenberg layout using Events Manager shortcodes.
On the left I’m trying to display the next available event (regardless of how far in the future that may be)
On the right, all other events in the future (to a limit) i.e. The list that excludes the first item.
I can mostly work out the right-hand tile, but I’ve hit some snags interpreting both the shortcode attributes and the placeholders.
This is an amazing tool and I’d rather be lost in complexity than frustrated by simplicity. I’ve been struggling to interpret the search attributes and placeholders in the documentation without clear contextual examples for each one. e.g. #_{x} or #@_{x} – I have no idea how this should look in context of a live placeholder set.
]]>I have a display issue with the “Next Event” module in the single event page.
See: https://bnsorg.be/event/general-assembly-2020-and-evening-lecture/
The website is running with MEC version 5.12.6., WordPress 5.5.1 and PHP 7.4.
I hadn’t this issue with the previous version 5.12.5.
Could you fix it?
Thank you for your help.
BR
]]>I have a question. On my single event page, at the very bottom of the page, there are ‘Prev:’ and ‘Next:’ links. Those links open previous and next event (based on the one displayed at the page) BUT they open events based on a PUBLISHED date not on EVENT STARTING date. So, for example, if I publish the event today but the starting time of that event is 10 days from today and if I publish an event tomorrow and that event will start in 5 days, if I am on a single page of an event from yesterday and try to open the next event, the one which will start in 10 days will be opened instead of the one that starts in 5 days, just because the publishing date is closer to the event I am currently on. I’d like the next one to be the one that will happen next, not the one that I published after I publish the one I am currently on.
Thanks in advance for your help!
]]>how can i change the background on mobile behind that link only to white.
ie the color on mobile that appears behind
Next Events <span>?</span>
https://www.ads-software.com/plugins/events-manager/
]]>The current event will be displayed large at the top of the page and then in small boxes it will display allt he upcoming events below.
Thanks,
Rob
https://www.ads-software.com/plugins/events-manager/
]]><?php
/**
* Shows the next event according to given specifications. Accepts any event query attribute.
* @param array $atts
* @return string
*/
function em_get_next_event_shortcode($atts, $format='') {
global $EM_Event, $post;
// Get the first event in the list
$events = EM_Events::get( array('limit'=>1) ); // It's an array at this point
// Make sure we got something
if( !empty($events) ) {
// Now set the global
$EM_Event = $events[0];
}
// Now continue just like the originaL
$return = '';
$the_event = is_object($EM_Event) ? clone($EM_Event):null; //save global temporarily
$atts = (array) $atts;
$atts['format'] = ($format != '' || empty($atts['format'])) ? $format : $atts['format'];
$atts['format'] = html_entity_decode($atts['format']); //shorcode doesn't accept html
if( !empty($atts['event']) && is_numeric($atts['event']) ){
$EM_Event = em_get_event($atts['event']);
$return = ( !empty($atts['format']) ) ? $EM_Event->output($atts['format']) : $EM_Event->output_single();
}elseif( !empty($atts['post_id']) && is_numeric($atts['post_id']) ){
$EM_Event = em_get_event($atts['post_id'], 'post_id');
$return = ( !empty($atts['format']) ) ? $EM_Event->output($atts['format']) : $EM_Event->output_single();
}
//no specific event or post id supplied, check globals
if( !empty($EM_Event) ){
$return = ( !empty($atts['format']) ) ? $EM_Event->output($atts['format']) : $EM_Event->output_single();
}elseif( $post->post_type == EM_POST_TYPE_EVENT ){
$EM_Event = em_get_event($post->ID, 'post_id');
$return = ( !empty($atts['format']) ) ? $EM_Event->output($atts['format']) : $EM_Event->output_single();
}
$EM_Event = is_object($the_event) ? $the_event:$EM_Event; //reset global
return $return;
}
add_shortcode ( 'next_event', 'em_get_next_event_shortcode' );
?>
https://www.ads-software.com/plugins/events-manager/
]]>Is there a way to show only one event? For instance I want a code that will show only the next upcoming event so I can put that in a widget and post it in the side bar or on the home page or whatever.
Thank you!
https://www.ads-software.com/plugins/very-simple-event-list/
]]>https://www.ads-software.com/plugins/events-manager/
]]>