Hi,
You could use something like this:
{fully_booked} Enough {/fully_booked}
{has_spaces} #_AVAILABLESPACES {/has_spaces}
http://wp-events-plugin.com/documentation/conditional-placeholders/
Thank you but I mean if there is 5 spaces left: don`t worry there is enough free.
if there is less than 5 spaces show them the actual number of available spaces.
<strong>Is there a way to do that?</strong>
If it is fully booked it says full I got that with
{fully_booked} full{/fully_booked}
Is there any way to create something like a if #_AVAILABLESPACES>5 than “enough” function???
Hi
I a not really good in poetry so I wonder what the necessary tweaks would be for my problem. Can anybody help ?
`
add_action(’em_event_output_condition’,’my_em_styles_event_output_condition’, 1, 4);
function my_em_styles_event_output_condition($replacement, $condition, $match, $EM_Event){
if( is_object($EM_Event) && preg_match(‘/^has_style_(.+)$/’,$condition, $matches) && is_array( $EM_Event->styles ) ){
if( in_array($matches[1],$EM_Event->styles) ){
$replacement = preg_replace(“/\{\/?$condition\}/”, ”, $match);
}else{
$replacement = ”;
}
}
return $replacement;
}
like where fill I in my #_AVALIABLESPACES thing?
if you can code you can try to look into this snippet
if( $EM_Event->get_bookings()->get_available_spaces() <= 5 ){
…
}
Wow that is cool, I even understand what is going on in the snippet. Now a real noob question where do I enter it?
you can replace the tutorial if statement with the above snippet.