Events Made Easy Forums How do I … Using eme_events_list_filter to Add Category Icons

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #43418
    Anonymous
    Inactive

    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

    #48326
    Franky
    Keymaster

    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]

    #48327
    Anonymous
    Inactive

    Worked BEAUTIFULLY – I forgot about being able to use ‘contains’ – SO HANDY! Thank you.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top