Support

Home Forums Event Espresso Premium How to add Event Time to EE4 Registration Page

How to add Event Time to EE4 Registration Page

Posted: January 19, 2017 at 5:38 am

Viewing 9 reply threads


gazingelement

January 19, 2017 at 5:38 am

Hi I was wondering how to add the starting Date and Time of an event to the registration page.

Thanks!


Tony

  • Support Staff

January 19, 2017 at 6:26 am

Hi there,

Can you let me know where exactly you want to add those details? Maybe add a screenshot?

https://eventespresso.com/wiki/troubleshooting-checklist/#screenshots

The datetime details should be included within the single event details page, heres a basic example – http://take.ms/myxIZ

Are you looking to add additional details?


gazingelement

January 19, 2017 at 7:17 am

Hi Tony,

Thanks for the quick response.

I’ve the user jumping straight to registration from a page listing the events with ticket selectors.

If I can call it anywhere in the registration page before the input fields, I can position it with CSS. Or if it could be called within the ESPRESSO_CHECKOUT shortcode, that’d also be great.

Thanks again


Josh

  • Support Staff

January 20, 2017 at 9:41 am

Hi there,

Here’s some example code that you can get started with:

https://gist.github.com/joshfeck/63d01cf6d6236cf2cd240f97f9acc142

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.


gazingelement

January 22, 2017 at 8:24 pm

Hi Josh,

Thanks for the link. Is there a similar action hook for placing starting date on the thank you page.

Many Thanks!


Tony

  • Support Staff

January 23, 2017 at 6:43 am

Sure, something like this:

https://gist.github.com/Pebblo/9e375a3f6f3eb3e0e2aa88f3ef2fb72f


gazingelement

January 25, 2017 at 4:42 am

Thanks Tony,

I gathered that for both occasions we’re querying out of the EE_Registry class object.

I was going to ask if there is a similar way to call the venue and venue map, but if you could instead, teach me how to query for the Event ID of the Registration Session that would be great!

Thanks, again


Josh

  • Support Staff

January 25, 2017 at 7:49 am

if ( $checkout instanceof EE_Checkout ) {
    $transaction = $checkout->transaction;
    if ( $transaction instanceof EE_Transaction ) {
        foreach ( $transaction->registrations() as $registration ) {
            if ( $registration instanceof EE_Registration ) {
                $event = $registration->event();
                if ( $event instanceof EE_Event ) {
                    $event_id = $event->ID(); 
                }
            }
        }   
    }
}


gazingelement

February 2, 2017 at 11:11 am

Hi,

I was trying to use the _get_feature_image() function in the registration page. But I just realized it’s not an Event object function. Is there an equivalent function I could you for calling out the event’s feature image within registration?

Many thanks! 🙂


Josh

  • Support Staff

February 2, 2017 at 11:36 am

$image = $event->feature_image( 'full' );

echo $image;

Viewing 9 reply threads

The support post ‘How to add Event Time to EE4 Registration Page’ 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