Add specific category prefix to event titles on specific views

Home Forums Calendar Products Events Calendar PRO Add specific category prefix to event titles on specific views

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1250100
    jbenton
    Participant

    Would it be possible to prepend only sub-categories to the events title on specific widgets? I have followed the code from here: https://theeventscalendar.com/knowledgebase/add-category-prefix-to-event-titles/
    For example, I have multiple calendars, one of them being a “car calendar” which shows available company vehicles. The parent category being vehicles and make/model/color as the subcategory – I don’t want to show the parent category “vehicles”. Also, would it be possible to show the categories only on specific widgets of the same type (i.e. “events list”)?

    • This topic was modified 9 years, 1 month ago by jbenton.
    • This topic was modified 9 years, 1 month ago by Cliff.
    #1250809
    Cliff
    Member

    Hi. Are you saying you want it this way throughout your site or only on specific widgets, such as the one in your sidebar but not the one in your footer (just as example areas)?

    Also, how would you handle events that are in a top-level/parent category instead of in a child-level category?

    Do you have a link for us to reference? If you share an annotated screenshot or video screen capture, it might help communicate what you’re wanting.

    #1251012
    jbenton
    Participant

    This reply is private.

    #1251310
    Cliff
    Member

    Try this:

    https://gist.github.com/cliffordp/5899add4d18ccda7087534de6a04e52e

    Please let me know how this goes for you.

    #1251328
    jbenton
    Participant

    Thanks Cliff, That should work. I might have to live with having them show on all the widgets, I might play with some code to see if I can get them to only show on specific calendars/widgets. I appreciate your help.

    #1251381
    Cliff
    Member

    You bet!

    FYI: I tweaked the snippet to work slightly better.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Add specific category prefix to event titles on specific views’ is closed to new replies.