Title: Hide source code when pop-up was shown
Last modified: October 26, 2016

---

# Hide source code when pop-up was shown

 *  [bb15](https://wordpress.org/support/users/bb15/)
 * (@bb15)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/hide-source-code-when-pop-up-was-shown/)
 * Hi Damian,
 * small Q; is it possible to Hide the POP-up also in the WP source code when pop-
   up was shown/click away.
 * Now (iframe) data is still shown in the sourcecode, even if the pop-up isn’t 
   shown to a visitor because he already did and has a cookie for not showing.
 * Hope to here from you if there is a solution or if it is possible in the premium
   version?
    KR, B.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Damian](https://wordpress.org/support/users/timersys/)
 * (@timersys)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/hide-source-code-when-pop-up-was-shown/#post-8375874)
 * you could create a tiny script to remove it from source after the page is loaded.
   Adding in functions.php something like this should help (not tested)
 *     ```
       add_action ('spu/popup/after_popup', 'add_remove_script');
   
       function add_remove_script($box) {
           if( $box->ID != '555' ) 
             return;
       ?>
       <script>
       if( spuReadCookie( 'spu_box_555') ) {
        jQuery('#spu-555').remove();
       }
       </script>
   
       <?php
       }
       ```
   
 *  Thread Starter [bb15](https://wordpress.org/support/users/bb15/)
 * (@bb15)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/hide-source-code-when-pop-up-was-shown/#post-8395852)
 * Thanks Damian,
    will the pop-up still show up after the xx day cookie time is
   expired?
 * KR,
    B.
 *  Thread Starter [bb15](https://wordpress.org/support/users/bb15/)
 * (@bb15)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/hide-source-code-when-pop-up-was-shown/#post-8445135)
 * Hi Damian can you responded please?
    And does the Pro version work in the same
   way?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Hide source code when pop-up was shown’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/popups_efeef0.svg)
 * [Popups - WordPress Popup](https://wordpress.org/plugins/popups/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/popups/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/popups/)
 * [Active Topics](https://wordpress.org/support/plugin/popups/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/popups/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/popups/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [bb15](https://wordpress.org/support/users/bb15/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/hide-source-code-when-pop-up-was-shown/#post-8445135)
 * Status: not resolved