WordPress.org

Ready to get started?Download WordPress

Forums

Change Images according to a preset time (3 posts)

  1. morningstar79
    Member
    Posted 9 months ago #

    I'm pretty new to WordPress and I'm having some difficulty working this one out.

    I would like an image on a page to change according preset program based on time.

    It's for a radio station and one of them had the idea of showing the DJ who is currently on air and that it changes when someone else takes over. Obviously this will take some programming, but I don't know where to begin and what the program should look like (on the page and how to make a php in wordpress).

    Any and all help would be very mich appreciated.

  2. arncus
    Member
    Posted 9 months ago #

    Hello Morningstar79,

    You'd figure that this would be a common enough request that you'd see a plugin for this type of thing. In my search of the issue I found the following posts:

    Rotating header images based on time

    Rotating images based on time of the day

    You might also want consider creating a cron job to rename a graphic directory for you. You could set up multiple graphic directories that would be renamed into place at a certain time. It would take relatively little coding and accomplish task of changing your images on a scheduled basis. You can google "cron job" and you'll see a ton of references.

    I hope this helps get you issue resolved. Let us know if you still require assistance.

  3. morningstar79
    Member
    Posted 8 months ago #

    Hi Arncus,

    Sorry it took so long to reply. Busy, busy, busy...

    I've seen the rotating images based on time of the day link before. And a simple thing such as a case is really easy to make. The problem is that I no idea where to put it. I'm no stranger to programming and have made many javascripts, php-pages, etc. But as I'm new to wordpress I'm confused where to put the code. I've tried to put in on a page but all I get is the code litteraly on the page. Probably a basic and lame question, but if I don't ask I can't learn.

    I'll also check out the cronjob reference and let you know how that works out.

Reply

You must log in to post.

About this Topic

Tags

No tags yet.