Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
EE Calendar - Color Change for Sold Out Events | Event Espresso - Staging Server

Support

Home Forums Calendar EE Calendar – Color Change for Sold Out Events

EE Calendar – Color Change for Sold Out Events

Posted: March 31, 2014 at 1:55 am

Viewing 1 reply thread


Stephanie C Person

March 31, 2014 at 1:55 am

I’m trying to find a way to help online viewers instantly determine sold-out events from those still available.

Is there a way via CSS to change the color of an event once it’s been sold out? I know it’s possible to use colors variation for the calendar via Event Categories, but I don’t see anything for sold-out events.

Any thoughts?


Dean

  • Support Staff

March 31, 2014 at 3:33 am

Hi,

It’s possible but would require a template edit as well.

As an example, I added the following to the event_list_display.php about line 42 above the h3 title tag

<?php
$showsoldout = '';
$soldoutcheck = get_number_of_attendees_reg_limit($event_id, 'available_spaces');
if($soldoutcheck === 0) {
	$showsoldout = "soldout";
}
?>

then I added

<?php echo $showsoldout; ?>

to the h3’s class code.

Now I can use CSS to modify the look of events with 0 available spaces (sold out).

This would need to be repeated for single registrations as well.

That’s just an example of course but hopefully you get the idea.

Viewing 1 reply thread

The support post ‘EE Calendar – Color Change for Sold Out Events’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso - Staging Server