Support » Plugin: WP FullPage » Mobile detection and theme switch but not working

  • rest_in_peace

    (@rest_in_peace)


    I would like to switch the theme when someone connect via mobile device. Any Mobile Theme Switcher this plugin can do the work but it only showing the Fullpage page with no css and everything else only text. But not switching the theme. So, is there something that need to be done in fullpage to do that ? even for test purpose i deactivated theme that is integrated with fullpage but still not working.

    So, any suggestion ?

    https://wordpress.org/plugins/wp-fullpage/

Viewing 4 replies - 1 through 4 (of 4 total)
  • rest_in_peace

    (@rest_in_peace)

    I guess the problem is that in pages the home page is set to is it full page = Yes. So, what it could be done that it will only turn on with desktop version and in case of mobile it will be turn off.

    Plugin Author Julien Zerbib

    (@julien-zerbib)

    Hi !

    Have you found a solution to your issue ?
    Did not try that on my side.

    Thanks,

    Julien

    Hi Julien thanks for replying back. No I didn’t find any solution except plugin that switch to another URL. But, theme switch didn’t work.

    Plugin Author Julien Zerbib

    (@julien-zerbib)

    Hi !

    I may have found a solution for you !

    You could use a filter I set up in the current plugin version :
    apply_filters( 'wpfp_fullpage_template', $fullpage_template, $post );

    You just have to detect if you are in a mobile device in this hook and return the good template in this case…

    You should have something like :

    add_filter( 'wpfp_fullpage_template', 'YOUR_HOOK_NAME', 10, 2 );
    function YOUR_HOOK_NAME( $fullpage_template, $post ) {
        if( IS_MOBILE_DEVICE ) {
            return 'THE_PATH_TO_YOUR_THEME_FILE.php';
        }
        else {
            return $fullpage_template;
        }
    }
    

    It should normally work 😉

    Regards,

    Julien

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Mobile detection and theme switch but not working’ is closed to new replies.