• On our event listings, we show an icon next to each event with the category. This works great most of the time.

    However when an event has multiple categories, that’s when we sometimes run into issues. It always uses the image for the category based on alphabetical sorting as far as I can tell.

    For example:
    My event has multiple categories – Regional Events and Conventions.
    I’d like it to show the category image for Regional Events
    However it always shows the image for Conventions

    I’ve tried changing the order that categories are displayed in settings to the id and also the slug (changing the slug to 1-regional so it will be first) but none of those make a difference, so I think that only affects the order of the categories in a list and nothing to do with the image it uses.

    I’ve been hunting for an answer though here and the documentation for over an hour so figured it’s time to ask for help. If anyone can point me in the right direction of a way to either a) choose which image is displayed; or b) a way to specify a default order of images so it will always use the image from the top of that list rather than alphabetically (we only have a small number of categories we use so I could just give them a priority as it likely won’t need to change).

    • This topic was modified 3 months, 2 weeks ago by dalekyuna. Reason: Fixed Title
Viewing 1 replies (of 1 total)
  • Are you using a placeholder to display the event category image? I see the following template file is used to display the images for all the categories associated with an event (when the #_EVENTCATEGORIESIMAGES placeholder is specified):

    wp-content/plugins/events-manager/templates/placeholders/eventcategoriesimages.php

    You could create your own placeholder to display a category image for an event doing somthing similar to the above template file but just display the image for one of the categories in the case when there was more than one category associated with the event.

    Here’s a tutorial on creating a custom placeholder: https://wp-events-plugin.com/documentation/tutorials/create-a-custom-placeholder-for-event-formatting/

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.