Support

Home Forums Event Espresso Premium How do Iadd a category slug to the body class of the registration cancelled page

How do Iadd a category slug to the body class of the registration cancelled page

Posted: December 22, 2017 at 9:27 pm

Viewing 2 reply threads


MoDiva

December 22, 2017 at 9:27 pm

Hi, I have a follow up question to this thread: https://eventespresso.com/topic/looking-for-unique-thank-you-page-based-on-event/

My website is https://secure.semcoproductions.com/atlanta-home-show/buy-tickets-north-atlanta-home-show/

I would like to add a category slug to the body class of the registration cancelled page just like I added it to the checkout and thank you pages. In other words, if someone adds a ticket to their cart then clicks Cancel Registration, the page that loads contains the same header and footer as the Checkout page.

Possible?

Thanks.


Tony

  • Support Staff

December 28, 2017 at 4:54 am

Hmm, the registration cancelled page clears the session.

In the previous examples, we used the session to pull in the details needed for the body class, so clearing the session means we don’t have the details we need in that session. However session is cleared in the_content call, the body_class should be set before that call so you can try:

https://gist.github.com/Pebblo/ff10c717dbef698ff7fbe357dedfd1a1#file-ee_taxonomy_body_class_example-php

Note that it’s a replacement function for the one I gave you previously and just does exactly the same as what it previously did, except now it also tries to pull the details on the ‘registration-cancelled’ page.


MoDiva

January 5, 2018 at 5:10 pm

That did the trick! Thank you for your prompt reply.

Viewing 2 reply threads

The support post ‘How do Iadd a category slug to the body class of the registration cancelled 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