Unique CSS classes for Future and Past Events
-
Hi,
I’m tying to insert some custom text to an event post that has passed.I customized your plugin to utilize your Event Location and Link fields to generate a link to a product page. I added some css to make the link into a styled button.
This is great for future events, but once an event passes i want to remove this button and replace it with some text like: “Registration is closed for this event”.
I can accomplish this by hacking adding a class to the past events page, then adding in some css to hide the link and insert some content. See my sample page here: https://humanesmarts.org/past-camps-and-events/
The problem i am having is, once a user clicks to the past event’s full event post, that css class is no longer present, so my custom css is not applied. This makes sense because the future and past events use the same template.
What I would love is if your plugin added a unique class to any post that is current or in the future, and another unique class for any post that is in the past. Can you do this?
This way i can write some custom css that only applies to future posts and some that only applies to past events.
I don’t want to edit anything in the actual plugin so I can continue to pull updates.
I hope I haven;t totally confused you… let me know.
Thanks!!
The page I need help with: [log in to see the link]
- The topic ‘Unique CSS classes for Future and Past Events’ is closed to new replies.