- This topic has 2 replies, 2 voices, and was last updated 12 years, 9 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘How do I …’ is closed to new topics and replies.
Events Made Easy › Forums › How do I … › Using eme_events_list_filter to Add Category Icons
Hi again.
I want to add an icon to the event notes(detail) for each category the item belongs to.
I haven’t worked with filters before, so I’m hoping it’s something really obvious. Here’s how I was going to do it:
add_filter('eme_event_list_filter','fwt_classes_categories_list');
function fwt_classes_categories_list($events) {
//print_r($events);
foreach($events as $key=>$event) {
$event['event_notes'] = 'categories' . $event['event_notes'];
}
return $events;
} // end function fwt_classes_categories_list
Eventually, I would replace the word “categories” with some code that loops through the events categories and gets the appropriate icon, but I can’t even get this to work for now.
Thanks for any guidance….
/Wendy
Why don’t you use conditional tags in the format setting?
[events_if tag="#ESC_CATEGORIES" contains="cat_name"] a http-link to an image [/events_if]
Worked BEAUTIFULLY – I forgot about being able to use ‘contains’ – SO HANDY! Thank you.