Support

Home Forums Event Espresso Premium Show Event Category in custom Event List Display Template

Show Event Category in custom Event List Display Template

Posted: May 30, 2014 at 3:21 pm


Martha Szufnarowski

May 30, 2014 at 3:21 pm

Hi, is it possible to show the category of an event in the Event Listing Display template? It was not in there commented out like most of the other information like price, venue, location, etc.


Lorenzo Orlando Caum

  • Support Staff

May 30, 2014 at 6:13 pm

Hello,

I’m not sure I understand what you are referring to so I’ll try to share some links. We have the Event List shortcode which works similar to the Espresso Events shortcode:

https://eventespresso.com/wiki/shortcodes-template-variables/#event-list

Then we have the Event View shortcode which handles the custom template addons:

https://eventespresso.com/wiki/custom-template-add-on/


Lorenzo


Martha Szufnarowski

May 30, 2014 at 6:21 pm

Ok to clarify. I have made a few customizations to the event_list_display.php template file. I would like to include what category each event is in.


Tony

  • Support Staff

June 2, 2014 at 2:36 am

Hi Martha,

You can use the [CATEGORY_NAME] shortcode to do this.

Simply add:

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

To the event_list_display.php template file wherever you would like to display the category name for that event.

Does that help?


Martha Szufnarowski

June 2, 2014 at 10:15 am

Hey that works! Thank you!


Tony

  • Support Staff

June 2, 2014 at 10:29 am

Great 🙂

I’m glad that worked well for you, I’ll mark this thread resolved.

The support post ‘Show Event Category in custom Event List Display Template’ 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