Change homepage by the hour

Wondering if there’s a way to have my homepage change at 6pm every day. I have a restaurant with a qr code menu that lands on my wordpress homepage. I would love for the homepage to change automatically at 6pm to a different menu. Anyone know if this is possible? Thank you!

  1. One thing to consider is page caching. If a user comes to your page during lunchtime, that view gets cached on their device, so if they were to come back to the same page at dinner time it could show them the lunch menu that they saw the first time, depending on your host and site settings.
    I think the best way to do it is with an Ajax call on your home page, we can wait until the user is done loading the page then make a request to WordPress saying “get me the menu”, on the backend php side it can check the current timestamp and respond with either the lunch or the dinner menu then in your Ajax response add the returned menu into the DOM for users to view.

  2. Make or look up a php snippet and use that. No reason to use a plugin for something as simple as that.


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer