How to show different time based content in the home page of my WordPress site at different times of the day? This plugin will allow you to schedule four times at a day when your home page timed content will change. You can specify an entirely new home page at each time:
- in the morning
- around noon
- in the afternoon
- at night
However, this is flexible and you can choose to schedule not all of them. For example, you can show a page from midnight to 07:00 am, and a different one from that time to midnight.
You also don’t need to cover the entire day. You can select for example to replace the home page around noon only, and then continue using the default home page you defined in the Reading Settings in the WP administrator side.
Usage of time based content
This plugin is available from the WordPress repository:
- Install and activate the plugin in WordPress
- Ensure you have four pages for this plugin, one for each moment of the day:
- one for the morning
- another for noon
- one more for the afternoon
- and a last one for the night
You’ll probably want to have a default page to display if the time ranges you specify pages don’t cover the entire day
- Go to the WordPress Reading settings page at WP Admin > Settings > Reading
- Set Your homepage displays to A static page and select any page you’d like to display whenever you’re not displaying one of the specific pages for the times of the day. For example, if you specify that the night page will be displayed until 12:00 am, and the morning page will start displaying at 07:00 am, then this page will display betwen that time when no other page is assigned.
- Go to the plugin settings page at WP Admin > Settings > Just In Time Content
- Select the time ranges and the page to display at each time.
- Save the changes.
If you now go to the front end of the site, you’ll see the page you specified.
Contribute to the plugin
You can find the source code of this plugin at its GitHub repository
You can contribute to it there, reporting issues or opening pull requests.
If you found this useful, feel free to buy me a coffee ☕️ so I can stay awake and create more useful plugins for you!