I'm using 1.5.4. The switch works fine on days of the week. I have includes/classes/Mobile_Checker.php ,and in the legacy template that I want to use as default I have , in common/html_header.php
if (!class_exists('Mobile_Detect')) {
include_once(DIR_WS_CLASSES . 'Mobile_Detect.php');
$detect = new Mobile_Detect;
}
Then in set_template.php , I have ,
function use_nondefault_template() {
// check whatever you want to here.
if($ismobile) {
return true;
}
return false;
}
But this won't switch the template when the site is accessed by a mobile device , so I figure I must be missing something ?
Bookmarks