PHP Snippet 1:
<meta http-equiv="refresh" content="10; URL=http://yoursite.com/page.php">
PHP Snippet 2:
<?php
add_action('wp_head', 'some_function');
function some_function() {
if($someCondition) { ?>
<meta http-equiv="refresh" content="10; URL=http://yoursite.com/page.php"> <?php
}
}
PHP Snippet 3:
if($my_condition == false){ ?>
<script type="text/javascript">
$(document).ready(function() {
var redirection_link=<?php echo json_encode(admin_url( 'admin.php?page=my_plugins_settings_page' )); ?>;
alert('Please check your Settings first!');
window.location.replace(redirection_link);
});
</script>
<?php
}
PHP Snippet 4:
<head>
<meta http-equiv="refresh" content="10;url=<?php echo $dw_attachment_url ?>" />
<script>
var seconds = 0;
function displayseconds() {
seconds += 1;
document.getElementById("secondsdisplay").innerText = "This page will be redirect in " + seconds + " seconds..";
}
setInterval(displayseconds, 1000);
function redirectpage() {
window.location = "<?php echo $dw_attachment_url ?>";
}
</script></head>
PHP Snippet 5:
get_header('extra');
PHP Snippet 6:
wp_redirect($page, $interval = 20)