Support

Home Forums Event Espresso Premium How to drop #checkout anchor from registration/checkout page?

How to drop #checkout anchor from registration/checkout page?

Posted: February 25, 2016 at 1:02 pm


Marah Walsh

February 25, 2016 at 1:02 pm

Hi,

I have made changes to the registration page to fit my theme and everything works fine except when the user goes to http://www.pharmavoice.com/blog/events/pharmavoice-100-celebration-tickets-2016/ , selects a ticket, and clicks “Register Now” they are sent to http://www.pharmavoice.com/event-registration-checkout/#checkout which has the #checkout anchor in it. The result when they get to this page is that the browser scrolls down part of the page to the anchor, which prevents them from seeing the beginning of the page.

Can you recommend a way I can either get rid of the anchor or change the link so that it doesn’t include the #checkout anchor parameter? I’m not sure what template I should be overriding and if it’ll cause any problems to simply remove the anchor from html/php. Any help you can offer is greatly appreciated.


Josh

  • Support Staff

February 25, 2016 at 1:30 pm

Hi Marah,

It turns out you’ll potentially cause new issues if you remove the #checkout tag. Event Espresso adds it for a reason, and needs it to function correctly.

If you want to force the browser to scroll to the top of the page during the steps that have the registration form and checkout form, you can add some JavaScript to your theme’s page templates (or into a theme’s function file that loads on the checkout pages), that scrolls back to the top of the page on the document ready and ajaxComplete events.

Here’s some example code that you’re welcome to use:

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


Marah Walsh

February 25, 2016 at 2:30 pm

Hi Josh,

Thank you very much. In case anyone else has the same problem, I decided to implement it right into the template itself by adding the following just before the footer:


<script>
jQuery( document ).on('ajaxComplete ready', function() {
var scroll_pos=(0);
jQuery('html, body').animate({scrollTop:(scroll_pos)}, '2000');
});
</script>

Thanks again for the prompt, concise reply.

The support post ‘How to drop #checkout anchor from registration/checkout 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