• Resolved omniafausta

    (@omniafausta)


    Hi,

    My client wants something different happening on the single pages of coming events than on the single pages of past events.
    I can do this through styling, but I don’t see a difference in the body classes of a coming event vs an event that already took place.

    Is there a way to add a class to the body of a single-mc-event once an event has already taken place (they want to show these still in an archive)? Maybe through a function?

    I hope you understand what I mean!!

    Thanks for any help you can give.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Joe Dolson

    (@joedolson)

    Yes, I see what you’re saying. Those classes exist on the event content, but not on the body element, which limits the scope of your styling.

    It shouldn’t be a problem to render those styles earlier so I can put them on the body class. Although I’ll probably need to prefix them separately, since otherwise existing classes will suddenly appear someplace new, which could cause a bunch of style problems.

    Plugin Author Joe Dolson

    (@joedolson)

    Thread Starter omniafausta

    (@omniafausta)

    Thanks so much for picking this up and helping me with this!

    I still have few questions:

    • you say: ‘Those classes exist on the event content’ but I don’t see any difference in classes anywhere between past and future events (the single event pages), but maybe I am overlooking something?
    • my php-knowledge is quite basic (just enough to be dangerous hahaha) so I am not able to understand all you have written there. What will be the body-class for a future event page and what will be the body-class for a past event page?
    • do you have any idea on when that next release will be? (so I can plan on picking this up)

    Thanks again!

    Thread Starter omniafausta

    (@omniafausta)

    Thanks for this! Just had time to update and saw the ‘single-future-event’ body-class. This will definitely work, thanks so much!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘is it possible to have different styling for coming and past events?’ is closed to new replies.