You should create a small plugin that checks the time stamp and run on an alternate page or similar. Bigger than the time stamp, the default WordPress run should work. An Example, write my answer to this question that’s not working code.
The method timestamp
is your key to control the logic for loading an alternate splash page. The current example loads the alternate page only if the date is the current date. So in this method, you should enhance the logic, like now is smaller than the loading starter’s defined date.
Load in the WP environment
add_action(
'plugins_loaded',
static function (): bool {
try {
(new Alternate())
->set(__FILE__, '2020-11-06')
->run();
} catch (Throwable $error) {
if (defined('WP_DEBUG') && WP_DEBUG) {
throw $error;
}
return false;
}
return true;
}
);
Class to control the alternate page
use DateTime;
class Alternate
{
private $pluginurl;
private $date;
/**
* @param string $root
* @param string $date
*
* @return Alternate
*/
public function set(string $root, string $date): self
{
$this->pluginroot = plugin_dir_path($root);
$this->pluginurl = plugin_dir_url($root);
$this->date = $date;
return $this;
}
public function run()
{
// Load alternate page or WordPress loop.
if ($this->timestamp()) {
wp_cache_flush();
header('Location: '.$this->placeholderFile(), true, 302);
exit();
}
}
/**
* @return string
*/
private function placeholderFile(): string
{
if (file_exists($this->pluginroot.'assets/placeholder.html')) {
return $this->pluginurl.'assets/placeholder.html';
}
return $this->pluginurl.'assets/placeholder_en.html';
}
private function timestamp(): bool
{
return $this->date === (new DateTime())->format('Y-m-d');
}
}
Similar working plugin
You will find a similar idea in this solution, that splash a page on a defied date.
Note
I mean, it also gives free plugins for this goal. Maybe you will search for them. I haven’t a plugin in mind for this, but maybe the plugin “Maintenance Mode” should have this option.