Detect Mobile vs Desktop
-
I saw your code to detect and change content for a specific type of mobile:
global $mobile_smart; if ($mobile_smart->getCurrentDeviceTier() == MOBILE_DEVICE_TIER_SMARTPHONE) { // display main content the_content(); } else{ // display some other content - perhaps stored in custom meta field? }
[Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
I need a switch to display different content if it is mobile (mobile theme being used) vs desktop (regular theme being used). What would be the code to do that?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Detect Mobile vs Desktop’ is closed to new replies.