Support

Home Forums Event Espresso Premium Get event categories?

Get event categories?

Posted: October 24, 2012 at 5:59 am


Aimee Hayes

October 24, 2012 at 5:59 am

Hi,

I’m editing wp-content/uploads/espresso/templates/event_list_display.php to change how the events are displayed on my listings page.

I need to be able to display the category/categories each event is attached to. How do I do this?


Aimee Hayes

October 24, 2012 at 7:10 am

Never mind, I got it! But I can’t post the solution because square brackets get removed :/

Anyway, answer can be found here: https://eventespresso.com/wiki/shortcodes-template-variables/#event-category

  • This reply was modified 11 years, 6 months ago by  Aimee Hayes.


Jonathan Wilson

October 24, 2012 at 7:29 am

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:

<?php echo do_shortcode('[CATEGORY_NAME event_id="'.$event_id.'"]');?> 

Thanks again. 🙂

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.

Event Espresso