HELP: I need code to make something invisible on the page.

3 replies
I'm using a paid-for (cookie activated) countdown timer on my site called "Scarcity Builder" and when the timer expires after X days/hours it redirects visitors to a different page. This is for a 10 day long perpetual/evergreen launch where the launch sequence starts the moment someone opts into my list so obviously I can't manually change the redirection time for each individual optin. I could put the timer on every content page but that would immediately alert the optin that they are in a launch and I don't want them to know that until about 7 days into the launch when the sales page is live. However, if I could figure out how to MAKE THE TIMER INVISIBLE ON THE PAGE then I think I can achieve what I need to do.

This is an example of the code that the Scarcity Builder Countdown Timer generates that I copy and paste into the web page:

[scarcitybuilderx id="1"]

QUESTION: Does anyone know if there's some code I could wrap around the timer code that would make the timer invisible on the page? If so, could you show me what it should look like, please?

Thank you very much. :-)
#code #invisible #make #page
  • Profile picture of the author noah.whitmore
    Yes, there is code that you can wrap around the timer code. But, what you've posted here is the shortcode that you paste into the content editor of your WordPress admin area.

    This shortcode will be expanded into more complex code. Without know how the shortcode expands, and how the code ends up looking on your published page, I can't be totally sure what will do the trick.

    But, here's a good starting point...

    Step 1
    Go to the post/page where your shortcode is posted. Then, click on the tab titled 'Text' in the upper right corner of the content editor. This will make it so you can enter HTML directly into the editor.


    Step 2
    Find where you have posted the schortcode in the editor.


    Step 3
    Replace your shortcode with the following...
    HTML Code:
    <div style="position:absolute;top:-999em;left:-999em;display:none;">
    [scarcitybuilderx id="1"]
    </div>

    Basically, all we're doing is wrapping the shortcode in a <div> (which is kind of like a holder) and then moving that div off of the page and making it invisible. Then, when your shortcode expands, the more complex code should still be wrapped in the div - so it should be moved off of the screen.


    However, depending on the script that is loaded by the Scarcity Builder plugin, this might not work. For instance, maybe the shortcode prompts javascript to be loaded onto the page - and perhaps that javascript add the code for the countdown timer to the very bottom code of the page. In that case, the code won't be encased in the div that we've added so it won't be moved off of the screen.

    Could you let me know the URL of the page where the timer is posted? You can even PM it to me. Then, I will be able to give you a sure fire solution.

    - Noah
    Signature
    No Pitch For The Moment - Just A Nice Hello.
    So... 'Hello'
    Feel free to PM me if you have any questions about my posts. I'd like to hear from you!
    {{ DiscussionBoard.errors[10602334].message }}
    • Profile picture of the author magentawave
      Noah, you are so awesome for taking the time to show me exactly how to do this with screen captures and everything. And guess what? IT TOTALLY WORKED! The countdown timer was invisible on the page and it redirected at the exact time it was supposed to! YAY!

      I have been racking my brain trying to figure out how to get this redirect stuff work the way I need it to. The people at Optimizepress didn't know how and neither did the Scarcity Builder countdown timer people - but YOU did!

      THANK YOU SO MUCH for your help with this. I really appreciate it!
      {{ DiscussionBoard.errors[10603913].message }}
  • Profile picture of the author noah.whitmore
    Very glad to her that it worked for you! Yup, things can get dicey with those shortcodes. It looks like you know exactly what you're putting into your page - but the code's going to expand so you never really can be sure.

    Throw me a message if there's anything that comes up and I'll try to help out if I can.

    - Noah
    Signature
    No Pitch For The Moment - Just A Nice Hello.
    So... 'Hello'
    Feel free to PM me if you have any questions about my posts. I'd like to hear from you!
    {{ DiscussionBoard.errors[10603937].message }}

Trending Topics