Support

Home Forums Event Espresso Premium Display gategory title in upcoming widget

Display gategory title in upcoming widget

Posted: February 4, 2013 at 4:40 am

Viewing 4 reply threads


Marc Diepeveen

February 4, 2013 at 4:40 am

Hi, is it possible to display the category title in the upcoming events widget when there is no specific category selected? It does work when I select a category and use “$category_name”, but I want to use all categories.


Dean

February 4, 2013 at 5:22 am

Hi Marc,

Im not sure I follow what you are trying to say, how can you display a category title if the event doesn’t have a category attached to it? There is no data there as it isnt selected so nothing will display.

If you are trying to display a list of categories that will link to a page with the appropriate events, sorry no we don’t have that functionality at this time.


Marc Diepeveen

February 4, 2013 at 5:28 am

Hi Dean,

What I mean is that I am using the upcoming events Widget, which shows a couple of events. But I’d like to also show the category every event belongs to. But it doesn’t show a category unless I select a specific category in the Widget.


Dean

February 4, 2013 at 5:45 am

Hi

OK I understand now.

If you have no objection to editing the widget.php template (make sure it is copied to the uploads/espresso/templates directory and edited there) then you can add the following code around line 129 where the event link is echoed.

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

Of course it will need styling etc doing to it but it will output the category.


Marc Diepeveen

February 4, 2013 at 6:38 am

That works great, thanks!

Viewing 4 reply threads

The support post ‘Display gategory title in upcoming widget’ 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