• I saw only one topic that asked this question and was closed without any answer posted in it, so here’s the solution I found to do just that while waiting for the devs to implement this feature.

    In the file /wp-splash-page/inc/class-wp-splash-page.php, add this condition just before the return true; statement in the test() public function:

    if ( $this->settings['show_on_mobile'] && ! $this->detect->isMobile() && ! $this->detect->isTablet() )
                return false;

    This tells the test() function to give a “deactivated” state to the splash screen if the box “Show on mobile” is ticked in the administration while the current browser is not a mobile one. You could even change the text for the mobile option in the admin in the file /inc/admin/class-wp-splash-page-admin.php on line 64 to “Show on mobile browsers only” if you want.

    I hope this helps some people out. If you’re doing this, don’t forget to keep a backup copy of the file(s) you modified in case the plugin gets updated.

    https://wordpress.org/plugins/wp-splash-page/

  • The topic ‘Splash screen only on mobile’ is closed to new replies.