How to build this feature wherein opening hours are shown dynamically to the visitor on the website?
Reference Website: https://www.hydeparkdentalcare.com.au
Reference opening hours:
How to build this feature wherein opening hours are shown dynamically to the visitor on the website?
Reference Website: https://www.hydeparkdentalcare.com.au
Reference opening hours:
use onditions for widgets
OR widget Code
<?php
$day = date('N');
if ($day == 1) echo 'Open from 8-00 to 11-00';
//etc ...
if ($day == 4) echo 'Open from 8-00 to 11-00';
if ($day == 5) echo 'Open from 10-00 to 11-00';
?>
to style the current day.
add dymanic class to each element of the day
.
and use css style
.day1-1, .day2-2, .day3-3, .day4-4, .day5-5, .day6-6 {
background: #ccc;
}
Thanks for the tip, will give it a go, read the docs, and try to build it up, cheers.