Support

Home Forums Event Espresso Premium Get/Echo the Event Status using Custom Post Type?

Get/Echo the Event Status using Custom Post Type?

Posted: April 17, 2013 at 1:00 pm


Tracy Rice

April 17, 2013 at 1:00 pm

Hi there,

I am using the Post Type setup with Event Espresso since I am wanting to do some additional styling and work to the layout of the “Event List” style, such as changing the color of the Event Attendees when registration gets low (to incite people to register soon).

So far I have everything working, except that if a Event closes or the registration closes, the Post Type doesn’t get removed, so the user can try and register for a closed event, which causes kinds of weird behavior.

Is there a post_meta value I can retrieve that will allow me to echo if the event is Open or Closed?  This way, I would be able to write an “if statement” that I could match and remove the Register button all together if the event is not able to be registered for.

Here is the page I am working with to give you an idea of why I am attempting it this way:

http://www.bravooutings.com/book-now/


Tracy Rice

April 17, 2013 at 1:48 pm

I realize now that I can use Custom Files and heavily modify the event_list_display.php template to do what I want ultimately, and it feels cleaner this way.

But, I am also curious about the answer to my question, as well!  🙂


Josh

  • Support Staff

April 17, 2013 at 3:30 pm

Hi Tracy,

There is a value for the event registration end that’s listed in the documentation here:

https://eventespresso.com/wiki/shortcodes-template-variables/#custom-fields

Which could be used for the case when the registration closes. In most cases registration would be set to close at the same time or before the event closes so that might work for you.

As an aside, you can actually drop a modified event_list_display.php template into the active WP theme and it will load from there.

Hope that helps! If possible please consider entering your site for being included into our showcase. It’s a great looking site! 🙂

https://eventespresso.com/showcase/

The support post ‘Get/Echo the Event Status using Custom Post Type?’ 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