Events Made Easy Forums How do I … Add event category to body class

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #59897
    Anonymous
    Inactive

    I want to be able to implement style changes for a particular category of event in the single event page and it’d be great if I could just add the category to the body class, but I’m not sure if it’s possible.

    Or maybe I can add the event category to this function and do it that way and just call a different header for that category.

    eme_is_single_event_page()

    Can you help?

    #59898
    Franky
    Keymaster

    You can add enclosing div’s to the single event format (and add the class to the div then).

    #59900
    Anonymous
    Inactive

    Thanks for responding Franky.

    Yes your suggestion can wrap the event content with a category class which is okay and I’ve done that with the event list, but I actually want to change the main page header and all the colours for one of the categories so I was hoping to say if eme_is_single_event_page() and the category / taxomony is *Event category* then get header(‘2’)

    Or adding the event category to the main body class function would let me achieve what I need as well. Can’t get that to work.

    Or even having a category specific page template within the theme. But I don’t think that can work with the way the events are coded.

    Are any of those solutions possible? I’ve tried various ways that work with other post-types but I can’t get it to work. Am I wasting time on something that can’t be done?

    #59901
    Franky
    Keymaster

    Well, it is easier than that: when editing an event, you can select the page template to be used (at the bottom right: “Template”). That is a list of your theme templates, so you can add templates to your liking and use those 🙂

    (edited: “editing a template” to “editing an event”)

    #59902
    Anonymous
    Inactive

    Doh – talk about over complicating things!
    Thanks Frankie – how did I miss that?

    #59903
    Franky
    Keymaster

    Sometimes even I forgot that I implemented that one 🙂

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