Support » Plugin: Events as Posts » 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]

Viewing 1 replies (of 1 total)
  • Plugin Author Ambrogio Piredda

    (@orbam7819)

    Hi, sorry for the late reply. That’s a great idea. I will consider that for the next plugin update. Right now I’m a bit busy with other stuff, but, yeah, I will definitely have a look into this.

    By the way, if you’ve got some idea about this right now, please let me know. Eventually, I can apply your idea to the plugin and publish the next update.

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