I have found what looks like the right code:
// Redriect with a delay:
header(‘Refresh: 20; url=http://www.example.org/’);
Can this be inserted antwhere in footer.php?
Any input is welcome.
Here you can read a lot about redirection issues:
http://en.wikipedia.org/wiki/URL_redirection
Be aware that if you do a lot of redirection, google may penalize you.
If your site has moved, you should redirect with 301 permanently moved.
If redirecting after showing content, I would hook on the get_header .
function redirectMe( )
{
}
add_action('get_header', 'redirectMe');
You would need to inject the <meta refresh… /> within the <head></head>. If you wish different redirects, you can inside that function parse out your custom fields, inside the meta refresh.
OK – I think you have sailed past my level of expertise – which PHP file do I put this code in? Footer.php?
I have tried putting the following in the header & footer
<?php
// Redriect with a delay:
header(‘Refresh: 20; url=urel’);
?>
It throws the same error every time.
Warning: Cannot modify header information – headers already sent by (output started at /home/content/07/8625307/html/wp-content/themes/placeholder/header.php:5) in /home/content/07/8625307/html/wp-content/themes/placeholder/header.php on line 29