Support

Home Forums Event Espresso Premium Custom template breaks Register Now button

Custom template breaks Register Now button

Posted: August 25, 2015 at 8:20 pm

Viewing 3 reply threads


genevieve day

August 25, 2015 at 8:20 pm

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?

Issue can be seen in action here – http://new.jpknitandstitch.com/classes/august-1-day-workshop-learn-to-sew-crash-course-3

Here’s the code for the page – http://pastie.org/private/qdixqvgtqz9ovpuajiy6a


WisdmLabs

August 26, 2015 at 12:25 am

Hi Genevieve,

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.


genevieve day

August 26, 2015 at 5:02 am

Thanks, I was missing the ticket selector, doh. Copied from template files:

global $post;
if ( espresso_display_ticket_selector( $post->ID ) && ( is_single() || ( is_archive() && espresso_display_ticket_selector_in_event_list() ))) :
?>
<div class=”event-tickets” style=”clear: both;”>
<?php espresso_ticket_selector( $post ); endif;?>


Dean

August 26, 2015 at 5:04 am

Hi,

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.

Event Espresso