Home Forums Community Forum Conditional logic to display store hours for the current day of the week.

Tagged: ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • BillMc
    Participant
    Post count: 2

    I’m new to Avada so I’m still on the learning curve. My brick and mortar store is closed on Mondays and Tuesdays and has different hours each of the other five days. Is there a way to use conditional logic to have a Text Block display the correct hours (or a closed notification) based on the current day of the week? If so, can you please point me in the right direction in the documentation. I haven’t found anything relevant yet. Thanks.

    marklchaves
    Participant
    Post count: 779

    Or if conditional logic doesn’t work, it’s pretty straightforward using plain JavaScript.

    Live demo on CodePen.

    Install the JS (into the page footer area) from the pen and make sure your text block’s CSS ID is store-hours.

    Cheers!

    Mark

    BillMc
    Participant
    Post count: 2

    Thanks Mark. I’ll give it a try.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.