• Is there a way to set the splash screen to show to the user each time he accesses the website.

    Im asking this because a session can last as long as the browser keeps opening and i’d like the splash to be shown everytime someone enters the site.

    We have some of us this seems to work for and some of us once we go thru always get the home page even if we close the browser and reopen it. This is a MAC user. I am hoping there is somewhere in the php I can force it to show.

    https://thebestexoticwriterretreat.com/
    WP version 4.4.2 Midway theme.
    Thanks in advance.

    https://www.ads-software.com/plugins/wp-splash-page/

Viewing 2 replies - 1 through 2 (of 2 total)
  • I also faced the same issue and here is the way I solved it.

    in class-wp-splash-page.php file add new function

    public function get_cookie_name() {
    		return $this->cookie_name;
    	}

    Then edit wp_splash_page_generate() in init.php as follows

    function wp_splash_page_generate() {
    
    	wpsp_import_class( 'WP_Splash_Page', 'inc/class-wp-splash-page.php' );
    
    	$wpsp	= new WP_Splash_Page();
    
    	$cookieName = $wpsp->get_cookie_name();
    
    	if ( $wpsp->is_active() ){
    		$wpsp->splash_page();
    	}
     	else{
    		unset( $_COOKIE[$cookieName] );
    		setcookie( $cookieName, '', time() - ( 15 * 60 ) );
    	}
    
    }

    Hi nithin_axis

    Hope you can help me out a little. I’m trying your method, I did as you said, add the new function in class-wp-splash-page.php, I put it below function “is_ active”. Same with init.php replace the function wp_splash_page_generate() like yours but the page only show the splash one time. I’m thinking it has something to do with the ip getting stored in the db but so far I haven’t found a method to remove the value from there

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Spash page to show everytime the site opens’ is closed to new replies.