Support » Fixing WordPress » How opening a URL link automatically on page load?

  • I would like that after loading the Wordress page that WordPress opens the page indicated in the URL link automatically. Without the need for me to click on the link.

Viewing 1 replies (of 1 total)
  • @casimir11767

    ?
    You’ll need to be more specific on what you are trying to accomplish.
    If you would like to redirect the user away from your website to another page after viewing for a particular amount of time, you can use javascript added to your header.php file like this :

    <script>
    $(document).ready(function () {
        window.setTimeout(function () {
            location.href = "https://www.redirect-the-user.com";
        }, 5000);
    });
    </script>

    or even this :
    <meta http-equiv=”refresh” content=”5;url=https://www.redirect-the-user.com”/>

    with 5000 being 5 second.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.