I’m attempting to create a custom single-espresso_events.php file. Essentially I followed the guidance found in the support area and copied over the template contents into the child theme then just added in echo espresso_event_reg_button(); to show the register button. Super basic. I’m also displaying the event date but none of the other helper functions are currently in use. When I remove my custom template files the registration button works as expected. With my template files in place the register now button just reloads the single page rather than proceeding to the registration form. Obviously I have an issue with my single page but I have no idea what the problem is. Do I have to call the helper functions even if I’m not using them?
The issue is with espresso_event_reg_button() function. This function returns the link to event details page (not event registration page). If you check the href attribute of ‘Register Now’ link, it points to same page. Therefore, page gets reloaded on click of ‘Register Now’ link.
You need to call ticket selector function display_ticket_selector_submit() (function defined inside EED_Ticket_Selector class) instead of ‘espresso_event_reg_button’ function.
WisdmLabs has you covered here, the espresso_event_reg_button is the wrong one to use.
Viewing 3 reply threads
The support post ‘Custom template breaks Register Now button’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.