How To Redirect Page/Post to Other URL Without Plugin

5
(4)

If you need a quick way to redirect your page, posts to other URL, this is the place.

Simply put the code below to your page/post and you’ll get the redirection.

<script>
setTimeout(function(){
window.location.href = "https://google.com/";

}, 5000);
</script>

There are something you need to know:

  • Replace the number 5000 with the number of milliseconds you want to delay the redirect. If you want 10 seconds, put in 1000.
  • If your code is already inside a <script> block, don’t include the <script> and </script>
  • The code doesn’t appear visually on your site so don’t worry about the appearance of your page/post.

Click on a star to rate it!

Average rating 5 / 5. Vote count: 4

No votes so far! Be the first to rate this post.


Leave a Reply

Your email address will not be published. Required fields are marked *