• Resolved ruud1955

    (@ruud1955)


    I want to use a number of pages on my site for a temporary kiosk application. The pages should redirect after a period of inactivity to a welcome page with a screen show. I added this code to all relevant pages:

    <p><!DOCTYPE html><br />

    <html><br />

    <head><br />

    <title>Redirection</title><br />

    <meta http-equiv = "refresh" content = "200; url = https://ridgetopcollection.com/kmg-kiosk-start-screen/" /></p>

    which works great but I noticed that it adds a “Classic” textbox on the bottom of the pages that have the code. It does not show any code or text on the page, it just creates a few extra lines of empty space. Any ideas of a simple way (i have very limited coding skills) to get the functionality without the code taking up screen space??? Thanks in advance

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Subrata Debnath

    (@subrata-deb-nath)

    Here are two simpler options:Option 1: Use JavaScript for Redirection in a Code Snippet

    If you’re able to add JavaScript, here’s a simple approach that won’t add anything to the visible content:

    1. Go to the page’s settings in your CMS and look for an option to add a “Custom Code” or “JavaScript” section in the header (many themes or page builders have this).
    2. Add this code:
    3. <script> setTimeout(function(){ window.location.; }, 200000); // Redirect after 200 seconds </script>

    This code redirects the page after 200 seconds without displaying any extra space on the page.

    Thread Starter ruud1955

    (@ruud1955)

    Hi Subrata, that looks very straightforward but in WordPress using Astra theme I see NO option to add Custom Code or Javascript to a particular page. The only thing I can do is toggling between the Visual Editor and the Code Editor. I used the latter to add the html code that now creates the extra lines. What is your second idea? It has to be possible to add the code to just specific pages, not the whole site! So adding it to the header in Astra will not work. I apologise, I am not a programmer:(

    Thread Starter ruud1955

    (@ruud1955)

    Found a simple solution: I suppressed the vertical scrollbar with this code before the page layout HTML on each page that has the redirection code after the page code:

    <span class=”tagcolor”><span lang=”NL” style=”font-size:11.5pt; line-height:107%;font-family:Consolas;color:mediumblue”><!DOCTYPE<span lang=”NL” style=”font-size:11.5pt;line-height:107%; font-family:Consolas;color:red”>?html></span></span>
    <span lang=”NL” style=”font-size:11.5pt;line-height:107%;font-family:Consolas;color:mediumblue”><<span lang=”NL” style=”font-size:11.5pt;line-height:107%;font-family:Consolas; color:brown”>html<span lang=”NL” style=”font-size:11.5pt;line-height:107%; font-family:Consolas;color:mediumblue”>></span></span></span>
    <span lang=”NL” style=”font-size:11.5pt;line-height:107%;font-family:Consolas;color:mediumblue”><<span lang=”NL” style=”font-size:11.5pt;line-height:107%;font-family:Consolas; color:brown”>head<span lang=”NL” style=”font-size:11.5pt;line-height:107%; font-family:Consolas;color:mediumblue”>></span></span></span>
    <span lang=”NL” style=”font-size:11.5pt;line-height:107%;font-family:Consolas;color:mediumblue”><<span lang=”NL” style=”font-size:11.5pt;line-height:107%;font-family:Consolas; color:brown”>style<span lang=”NL” style=”font-size:11.5pt;line-height:107%; font-family:Consolas;color:mediumblue”>></span></span></span></span>

    <span lang=”NL” style=”font-size: 11.5pt; line-height: 107%; font-family: Consolas; color: brown; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;”>body?<span lang=”NL” style=”font-size: 11.5pt; line-height: 107%; font-family: Consolas; color: black; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;”>{</span>
    <span class=”csspropertycolor”>? overflow-y<span lang=”NL” style=”font-size: 11.5pt; line-height: 107%; color: black; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;”>:?hidden<span lang=”NL” style=”font-size: 11.5pt; line-height: 107%; color: black; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;”>;</span>?<span lang=”NL” style=”font-size: 11.5pt; line-height: 107%; color: green; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;”>/* Hide vertical scrollbar */</span></span>
    <span lang=”NL” style=”font-size: 11.5pt; line-height: 107%; color: black; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;”>}</span></span></span>

    <span class=”tagcolor”><span lang=”NL” style=”font-size:11.5pt;font-family:Consolas; color:mediumblue”></style<span lang=”NL” style=”font-size:11.5pt;font-family:Consolas;color:mediumblue”>></span></span>
    <span lang=”NL” style=”font-size:11.5pt;font-family:Consolas;color:mediumblue”><<span lang=”NL” style=”font-size:11.5pt;font-family:Consolas;color:brown”>/head<span lang=”NL” style=”font-size:11.5pt;font-family:Consolas;color:mediumblue”>></span></span></span>
    <span lang=”NL” style=”font-size:11.5pt;font-family:Consolas;color:mediumblue”><<span lang=”NL” style=”font-size:11.5pt;font-family:Consolas;color:brown”>/html<span lang=”NL” style=”font-size:11.5pt;font-family:Consolas;color:mediumblue”>></span></span></span></span>

    Perhaps crude but it does the job

    <span class=”tagcolor”><span lang=”NL” style=”font-size:11.5pt;font-family:Consolas; color:mediumblue”>?</span></span>



    Hi @ruud1955, Follow this methord

    Using a Plugin (Easiest Way)

    1. Install a Plugin:
      • Go to your WordPress admin dashboard.
      • Navigate to Plugins > Add New.
      • Search for “Insert Headers and Footers by WPCode” or “Custom CSS and JavaScript” plugins.
      • Install and activate the plugin.
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.