hello people
help me please, it's necessary to show one widget (free text) only at daytime and hide it for all the night.. how can I do this automatically?
hello people
help me please, it's necessary to show one widget (free text) only at daytime and hide it for all the night.. how can I do this automatically?
Try the Widget Logic plugin.
how can I put proper condition? like "show this widget only from 9 to 18 oclock"?
For daylight (from 9 thru 18), you can use this:
$hour = date_i18n('G'); if ($hour > 8 && $hour < 19 ) return true;
For dark (0 thru 8 or 19 thru 23), use this:
$hour = date_i18n('G'); if ($hour < 9 || $hour > 18 ) return true;
2 vtxyzzy: you're genius!! it works, great thanks!
This topic has been closed to new replies.