Aimee, Thanks for sharing the solution. The way to post code is to indent by four spaces, then enter your code. Here is the solution from the page you provided:
The support post ‘Get event categories?’ 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.