Support » Plugin: WPtouch » A way to force mobile mode

  • Resolved Josh Levinson


    The only way thus far I have been able to force WPTouch into mobile mode dependant upon a url is with the following code I whipped up:

    function empty_wp_touch_agents($device_list){
    	return array();
    function url_wp_touch(){
    	$url = $_SERVER['REQUEST_URI'];
    	$url = parse_url($url,PHP_URL_PATH);
    	$url = explode('/',$url);
    		$touch = new WPtouchProThree();
    		$touch->active_device = 'default';
    		$touch->active_device_class = 'default';

    Yes, I have the pro version. Not sure if this would work for the free version. My goal in posting here is to raise awareness and prove that it is definitely possible to do this, and there IS a need for it. Obviously what sucks is that this code is subject to the whims of WPTouch changing their class and/or function names.

    BraveNewCode – please make this a filter or something so that developers can force mobile mode if they want to, bypassing all requirements of user agents, etc.

    Again, there IS a good scenario for this, like when a portion of a site is going to be only accessed through a mobile app’s built-in browser (pass-through). I have seen multiple requests for this and I kindly ask that you add some solution better than mine into your plugin.


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘A way to force mobile mode’ is closed to new replies.