WordPress.org

Ready to get started?Download WordPress

Forums

Displaying something different depending on the time of day (6 posts)

  1. buskerdog
    Member
    Posted 4 years ago #

    I'm trying to set something up to show something different depending on the time of day (with four different possibilities. I have a Javascript option that I don't quite have working yet but I thought given how flexible WordPress is there might be some better way to do it. Anyone have any ideas? Plugins? Custom fields? Something?

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    Could be done with PHP code.

  3. There's a good thread here on changing style sheets per day, hour, season, etc.

  4. buskerdog
    Member
    Posted 4 years ago #

    Awesome! I know what I'm doing first thing Monday morning! Thanks.

    On a sidenote, I bet this would make a fantastic plugin.

  5. buskerdog
    Member
    Posted 4 years ago #

    Although, I'm looking to change more than just a stylesheet since I have an embedded webcam that needs to appear or not appear based on the time.... I'll figure it out.

  6. Here's an example for generting a link on a certain time and day, and php.net's date function page has lots of time/date examples I've used in the past.

Topic Closed

This topic has been closed to new replies.

About this Topic