I want to display a page for a few seconds and then redirect to the homepage.
Something like..
status_header(200);
get_header();
echo('<h2>content</h2>');
get_footer();
sleep(5);
wp_safe_redirect(get_site_url());
This doesn't work because I'll get
Warning: Cannot modify header information - headers already sent by
possible solutions
Sounds like I could try and add
<meta http-equiv="refresh" content="10;url=http://www.example.php">
Apparently this is now considered bad practice?
Or do something like
ob_flush();
flush();
sleep(5);
Help? Suggestions?
Thanks.